Re: Which files belong to which database?

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Oliver Fromme <olli(at)lurza(dot)secnetix(dot)de>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Which files belong to which database?
Date: 2003-09-10 10:49:27
Message-ID: 1063190966.5251.117.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Elphick(at)lfix(dot)co(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Mickey 2003-09-10 13:00:50 Lyris and Postgres
Previous Message Crombleholme, Roy 2003-09-10 10:33:15 Re: