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

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 (view raw or flat)
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

pgsql-novice by date

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

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