pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Hill <ken@scottshill.com>
To: Devrim GUNDUZ <devrim@commandprompt.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: How to find data directory
Date: Sun, 18 Dec 2005 17:29:21 -0800
Message-ID: <1134955761.7555.9.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.63.0512190250550.28030@evim.gunduz.org>
References: <1134772264.7276.2.camel@localhost.localdomain>
	<Pine.LNX.4.64.0512161549190.11428@glacier.frostconsultingllc.com>
	<1134784056.7354.2.camel@localhost.localdomain>
	<Pine.LNX.4.64.0512161933170.28807@discord.dyndns.org>
	<1134952457.7555.5.camel@localhost.localdomain>
	<Pine.LNX.4.63.0512190250550.28030@evim.gunduz.org>

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,




view thread (12+ messages)  latest in thread

Message-ID: <1134955761.7555.9.camel@localhost.localdomain>
Permalink:  ../1134955761.7555.9.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1134955761.7555.9.camel@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: ken@scottshill.com, devrim@commandprompt.com
  Subject: Re: How to find data directory
  In-Reply-To: <1134955761.7555.9.camel@localhost.localdomain>
  References: <1134772264.7276.2.camel@localhost.localdomain> <Pine.LNX.4.64.0512161549190.11428@glacier.frostconsultingllc.com> <1134784056.7354.2.camel@localhost.localdomain> <Pine.LNX.4.64.0512161933170.28807@discord.dyndns.org> <1134952457.7555.5.camel@localhost.localdomain> <Pine.LNX.4.63.0512190250550.28030@evim.gunduz.org> <1134955761.7555.9.camel@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox