Skip site navigation (1) Skip section navigation (2)

Re: How to find data directory

From: Ken Hill <ken(at)scottshill(dot)com>
To: Devrim GUNDUZ <devrim(at)commandprompt(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: How to find data directory
Date: 2005-12-19 01:29:21
Message-ID: 1134955761.7555.9.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-admin
There they are:

csalgorithm=# SELECT oid,datname FROM pg_database;
  oid  |   datname
-------+-------------
 17142 | testdb
 17143 | csalgorithm
     1 | template1
 17141 | template0
(4 rows)

Thank you for the help!

On Mon, 2005-12-19 at 03:01 +0200, Devrim GUNDUZ wrote:
> Hi,
> 
> On Sun, 18 Dec 2005, Ken Hill wrote:
> 
> > I have created two database named 'testdb' and 'csalgorithm'. How do I
> > find these databases? I was expecting the databases to be subdirectories
> > under the database directory (e.g. /var/lib/postresql/7.4/main/testdb
> > and /var/lib/postgresql/7.4/main/csalgorithm).
> 
> First run these commands:
> 
> SELECT oid,datname FROM pg_database;
> 
> This will prompt you the oid and the corresponding database name. Say the 
> oid for the csalgorithm is 41030. Now cd to
> /var/lib/postgresql/7.4/main/base/41030
> 
> But don't expect to see ascii database format there. :)
> 
> Regards,


In response to

pgsql-admin by date

Next:From: ZepDate: 2005-12-19 02:27:10
Subject: postgres on gentoo.
Previous:From: Peter EisentrautDate: 2005-12-19 01:06:20
Subject: Re: How to find data directory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group