Re: Where is the database located in 7.1.2?

From: caldodge(at)fpcc(dot)net (Calvin Dodge)
To: pgsql-general(at)postgresql(dot)org(dot)pgsql-sql(at)postgresql(dot)org
Subject: Re: Where is the database located in 7.1.2?
Date: 2001-08-04 00:06:31
Message-ID: ca6275f0.0108031606.4bd4bb95@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Raymond Chui <raymond(dot)chui(at)noaa(dot)gov> wrote in message news:<3B6AAD1B(dot)3EE76D65(at)noaa(dot)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

Browse pgsql-general by date

  From Date Subject
Next Message alavoor 2001-08-04 01:56:45 Very Precision Time for Database Server
Previous Message Stephan Szabo 2001-08-03 20:54:56 Re: re: 7.1.2 and foreign key unique constraint.

Browse pgsql-sql by date

  From Date Subject
Next Message Danny Aldham 2001-08-04 00:25:12 Re: Knowing new item in table...
Previous Message clayton cottingham 2001-08-03 21:55:37 Re: Feature Requests for 7.2 or 7.3 ...