Re: Location of databases

From: Andreas Wenk <a(dot)wenk(at)netzmeister-st-pauli(dot)de>
To: john shipley <johnwshipley(at)hotmail(dot)co(dot)uk>, pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Location of databases
Date: 2009-07-28 09:25:25
Message-ID: 4A6EC405.6040801@netzmeister-st-pauli.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

john shipley schrieb:
> Thank you for your reply. I am using PostgreSQL 8.3 with Ubuntu Linux
> 9.04. I installed it using the command line package manager APT-GET.
> Naturally, I had to change my password and set myself up as user
> manually.
> Judging by the other replies I have received, I am not making myself clear.
>
> I wish to use PostgreSQL with two other programmes. One is an open
> source statistics package called PSPP. I don't know if you are familiar
> with it. The present form of PSPP is 'under development'. Whilst there
> is a graphical user interface, PSPP relies extensively on command line
> operation. Indeed, certain of its features can only be accessed through
> the command line. When I use the term 'command line', I am, of course,
> referring to a script file or batch file (call it what you will),
> containing a list of instructions. In order to load the contents of a
> PostgreSQL file into PSPP, I have to show its location and name and
> indicate that is is a PostgreSQL file by means of a statement like the
> following:
>
> FILE = /home/myusername/.../.../.../ filenamedb(PSQL).
>
> Similarly, if I wish to connect to a PostgreSQL file via the Open Office
> RDBMS, in order to use that medium to construct a query visually, I have
> to point to the location of the file using a file manager.
>
> Therefore, I need to know where filenamedb is. In other words, what are
> '/.../.../.../'?

actually I don't know what PSPP is.

It is possible to install more PostgreSQL versions side by side using a different port for
each. With initdb you have to give the data directory for PG. There, all the necessary
data for the cluster are saved. Ubuntu is creating for each PostgreSQL version an own
folder as shown below.

In Debian based OS you will find all needed files in the following directoy's:

# home directory of user postgres (main is the so called data directory):
/var/lib/postgresql/8.3/main/

base
global
pg_clog
pg_multixact
pg_subtrans
pg_tblspc
pg_twophase
PG_VERSION
pg_xlog
postmaster.opts
postmaster.pid

The data for each database are located in a subfolder of "base" named with its OID. I
suppose this will be the folder you need or - dependent to your aqpplication - the main
directory shown above.

# configuration files:
/etc/postgresql/8.3/main/

# additional stuff:
/usr/share/postgresql/8.3/

Hope this helps ...

Cheers

Andy

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Wood 2009-07-28 09:48:45 Re: Location of databases
Previous Message Lonni J Friedman 2009-07-28 02:17:22 Re: total number of concurrent connections