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: (view raw, whole thread or download thread mbox)
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
> 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="" in String.concat "@" [name;tld];;
"The Linux  philosophy is laugh in  the face of  danger.  Oops.  Wrong
One.  'Do it yourself.'  That's it."  -- Linus Torvalds

In response to


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-2017 The PostgreSQL Global Development Group