X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6AF71D1B513 for ; Wed, 24 Sep 2003 16:13:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 68057-06 for ; Wed, 24 Sep 2003 13:12:39 -0300 (ADT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 47185D1B533 for ; Wed, 24 Sep 2003 13:12:37 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h8OGCQG11706; Wed, 24 Sep 2003 12:12:26 -0400 (EDT) From: Bruce Momjian Message-Id: <200309241612.h8OGCQG11706@candle.pha.pa.us> Subject: Re: Datafiles for Databases In-Reply-To: To: Christopher Browne Date: Wed, 24 Sep 2003 12:12:26 -0400 (EDT) Cc: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL106 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/282 X-Sequence-Number: 15260 Christopher Browne wrote: > In the last exciting episode, sgnerd@yahoo.com.sg ("Kumar") wrote: > > I was looking for a structure like oracle or ms Sql?server in Postgres. What I have expected is individual > > datafiles for individual databases. But i cant fine such items in the /usr/local/pgsql/data directory. > > > > Will the postgres create individual data file for databases? > > No. Just as with Oracle, PostgreSQL creates multiple files for each > database. > > > How to get the datafile path of a database? > > select oid, datname from pg_database; > > The path for database 'datname' will be: > $PGDATA/base/oid/ See the "Monitoring Disk Space" section in our manuals. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073