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 9E4969DC843 for ; Sun, 18 Dec 2005 21:29:17 -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 62207-01 for ; Sun, 18 Dec 2005 21:29:17 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from rwcrmhc12.comcast.net (rwcrmhc14.comcast.net [216.148.227.89]) by postgresql.org (Postfix) with ESMTP id 47FEC9DC86E for ; Sun, 18 Dec 2005 21:29:12 -0400 (AST) Received: from [10.0.1.5] (c-24-20-199-254.hsd1.or.comcast.net[24.20.199.254]) by comcast.net (rwcrmhc14) with SMTP id <20051219012915014008l4nle>; Mon, 19 Dec 2005 01:29:15 +0000 Subject: Re: How to find data directory From: Ken Hill Reply-To: ken@scottshill.com To: Devrim GUNDUZ Cc: pgsql-admin@postgresql.org In-Reply-To: References: <1134772264.7276.2.camel@localhost.localdomain> <1134784056.7354.2.camel@localhost.localdomain> <1134952457.7555.5.camel@localhost.localdomain> Content-Type: text/plain Organization: Scotts Hill Associates, Inc. Date: Sun, 18 Dec 2005 17:29:21 -0800 Message-Id: <1134955761.7555.9.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.03 required=5 tests=[AWL=0.030] X-Spam-Score: 0.03 X-Spam-Level: X-Archive-Number: 200512/193 X-Sequence-Number: 19913 There they are: csalgorithm=# SELECT oid,datname FROM pg_database; oid | datname -------+------------- 17142 | testdb 17143 | csalgorithm 1 | template1 17141 | template0 (4 rows) Thank you for the help! On Mon, 2005-12-19 at 03:01 +0200, Devrim GUNDUZ wrote: > Hi, > > On Sun, 18 Dec 2005, Ken Hill wrote: > > > 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). > > First run these commands: > > SELECT oid,datname FROM pg_database; > > This will prompt you the oid and the corresponding database name. Say the > oid for the csalgorithm is 41030. Now cd to > /var/lib/postgresql/7.4/main/base/41030 > > But don't expect to see ascii database format there. :) > > Regards,