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

Re: How to find data directory

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: How to find data directory
Date: 2005-12-19 02:56:39
Message-ID: 601x09n6ag.fsf@dba2.int.libertyrms.com (view raw or flat)
Thread:
Lists: pgsql-admin
ken(at)scottshill(dot)com (Ken Hill) writes:
> That works nice. It shows my data directory in
> '/var/lib/postgresql/7.4/main'. When I do an ls command, I get:
>
> $ sudo ls /var/lib/postgresql/7.4/main
> base    pg_clog      pg_ident.conf  pg_xlog          postmaster.opts
> root.crt
> global  pg_hba.conf  PG_VERSION     postgresql.conf  postmaster.pid
>
> 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).

They'll be in a subdirectory; the thing is, tables and databases are
not named _by name_.

The filenames are the OID numbers associated with either databases
(see pg_catalog.pg_database) or tables (see pg_catalog.pg_class).
-- 
let name="cbbrowne" and tld="ntlug.org" in String.concat "@" [name;tld];;
http://cbbrowne.com/info/unix.html
"The Linux  philosophy is laugh in  the face of  danger.  Oops.  Wrong
One.  'Do it yourself.'  That's it."  -- Linus Torvalds

In response to

Responses

pgsql-admin by date

Next:From: Michael FuhrDate: 2005-12-19 05:43:22
Subject: Re: How to find data directory
Previous:From: ZepDate: 2005-12-19 02:27:10
Subject: postgres on gentoo.

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