pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Christopher Browne <cbbrowne@acm.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Datafiles for Databases
Date: Wed, 24 Sep 2003 12:12:26 -0400 (EDT)
Message-ID: <200309241612.h8OGCQG11706@candle.pha.pa.us> (raw)
In-Reply-To: <m34qz9oxz6.fsf@wolfe.cbbrowne.com>

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



view thread (4+ messages)

Message-ID: <200309241612.h8OGCQG11706@candle.pha.pa.us>
Permalink:  ../200309241612.h8OGCQG11706@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200309241612.h8OGCQG11706@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pgman@candle.pha.pa.us, cbbrowne@acm.org
  Subject: Re: Datafiles for Databases
  In-Reply-To: <200309241612.h8OGCQG11706@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox