pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: caldodge@fpcc.net
To: pgsql-general@postgresql.org.pgsql-sql
Subject: Re: Where is the database located in 7.1.2?
Date: 3 Aug 2001 17:06:31 -0700
Message-ID: <ca6275f0.0108031606.4bd4bb95@posting.google.com> (raw)
References: <3B6AAD1B.3EE76D65@noaa.gov>

Raymond Chui <raymond.chui@noaa.gov> wrote in message news:<3B6AAD1B.3EE76D65@noaa.gov>...
> I installed  PostgreSQL 7.1.2 in Redhat 6.2
> 
> Now in 7.1.2 when I
> 
> cd $PGDATA/data/base
> ls
> 
> I only see some directories like 1, 18719, 18725
> I don't see my dbname. Where is my dbname located now in v7.1.2?
> Thank you!

Start psql in the database of your choice.

Type:

select oid,datname from pg_database;

Look at the oids - you'll see that each one corresponds to one of
those funny numbered directories.  For example, one such line on my
system is:

   88721 | phpgroupware

Sure enough, in /var/lib/pgsql/data/base there is a directory called
"88721".

So directory "88721" contains the "phpgroupware" database on my
system.

Calvin



Message-ID: <ca6275f0.0108031606.4bd4bb95@posting.google.com>
Permalink:  ../ca6275f0.0108031606.4bd4bb95@posting.google.com/
Also on:    postgresql.org/message-id/ca6275f0.0108031606.4bd4bb95@posting.google.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: caldodge@fpcc.net, pgsql-general@postgresql.org.pgsql-sql
  Subject: Re: Where is the database located in 7.1.2?
  In-Reply-To: <ca6275f0.0108031606.4bd4bb95@posting.google.com>

* 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