Location of database files?

From: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
Subject: Location of database files?
Date: 2002-09-10 09:47:37
Message-ID: 15741.49081.890813.429603@kelvin.csl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is there any way to determine the location of files in a database
without being the postgres user? Essentially i'm after the setting of
PGDATA so i can then show disk status (df) for that partition.

The pg_database catalogue has 'datpath':

If the database is stored at an alternative location then this
records the location. It's either an environment variable name or an
absolute path, depending how it was entered.

so I'm really looking for the default location...

I could knock together a C function to do this (and indeed another to
return the usage stats too), but would like to check first there's no
simple way already!

Regards, Lee Kindness.

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Kirkwood 2002-09-10 10:33:19 Re: Script to compute random page cost
Previous Message Hannu Krosing 2002-09-10 08:39:18 Re: Rule updates and PQcmdstatus() issue