X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 5E8DA9DCDEF for ; Sun, 18 Dec 2005 23:21:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82472-05 for ; Sun, 18 Dec 2005 23:21:25 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 087129DCDEA for ; Sun, 18 Dec 2005 23:21:18 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id jBJ3LF4S062515 for ; Mon, 19 Dec 2005 03:21:15 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id jBJ33tdT055878 for pgsql-admin@postgresql.org; Mon, 19 Dec 2005 03:03:55 GMT (envelope-from news) From: Chris Browne X-Newsgroups: pgsql.admin Subject: Re: How to find data directory Date: Sun, 18 Dec 2005 21:56:39 -0500 Organization: cbbrowne Computing Inc Lines: 24 Message-ID: <601x09n6ag.fsf@dba2.int.libertyrms.com> References: <1134772264.7276.2.camel@localhost.localdomain> <1134784056.7354.2.camel@localhost.localdomain> <1134952457.7555.5.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (Jumbo Shrimp, linux) Cancel-Lock: sha1:CzBS3aHfA383LlbmwLxpYywhUwI= To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=-1.321 required=5 tests=[ALL_TRUSTED=-1.44, AWL=0.119] X-Spam-Score: -1.321 X-Spam-Level: X-Archive-Number: 200512/194 X-Sequence-Number: 19914 ken@scottshill.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