Re: Where do my local data bases go?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Where do my local data bases go?
Date: 2012-01-30 15:56:29
Message-ID: 15265.1327938989@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Jean-Yves F. Barbier" <12ukwn(at)gmail(dot)com> writes:
> On Mon, 30 Jan 2012 01:26:07 -0700
> Kevin Goulding <kevingoulding(at)gmail(dot)com> wrote:
>> My question is -- how do I find where on my hard drive the newly created
>> database ends up?

> In Linux, files are in:
> /var/lib/postgresql/Pg_version_Nb/main/base/OID_of_DB

That's the case for some packagings of Postgres, but not all. The more
traditional location is /var/lib/pgsql/data/base/DBOID/...

>> I have searched the names, with no luck. Could it have
>> to do with the OID number

> Yep.

If you're interested in this sort of detail, you might find it useful
to read the "Database Physical Storage" chapter of the manual:
http://www.postgresql.org/docs/9.1/static/storage.html
(adjust link in the obvious way for whichever major version you're
running, as the details move around sometimes)

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2012-01-30 16:05:10 Re: PostgreSQL - Debian - Processes: postgres: writer process, etc.
Previous Message Jean-Yves F. Barbier 2012-01-30 10:54:41 Re: PostgreSQL - Debian - Processes: postgres: writer process, etc.