Re: Which files belong to which database? - Mailing list pgsql-novice

From Oliver Elphick
Subject Re: Which files belong to which database?
Date
Msg-id 1063190966.5251.117.camel@linda.lfix.co.uk
Whole thread Raw
In response to Which files belong to which database?  (Oliver Fromme <olli@lurza.secnetix.de>)
List pgsql-novice
On Wed, 2003-09-10 at 11:13, Oliver Fromme wrote:
> Hi,
>
> Is there a way to find out which files in $PGDATA belong
> to which database?  I need that information for accounting
> purposes (users are billed per Gbyte of data).  In mysql
> it is very easy, because the subdirectories have the same
> names as the databases.

The subdirectories in $PGDATA/base are named by the database oid.

The contrib module, oid2name, can be used to retrieve the database
names.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Draw near to God and he will draw near to you.
      Cleanse your hands, you sinners; and purify your
      hearts, you double minded."       James 4:8


pgsql-novice by date:

Previous
From: "Crombleholme, Roy"
Date:
Subject: Re:
Next
From: "szucs"
Date:
Subject: Search for data in a similar field in a related table, too