Skip site navigation (1) Skip section navigation (2)

Re: determining when a database was created

From: "Ian Lipsky" <postgres(at)merk(dot)caltech(dot)edu>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: determining when a database was created
Date: 2004-06-01 00:49:31
Message-ID: FD06100DD83F4B1BAA060752ED006C5D.MAI@merk.caltech.edu (view raw or flat)
Thread:
Lists: pgsql-admin
How can i determine which directory contains the database files? there are a few databases. I
though of doing that, but didnt know how to tell which directory belongs with which database.

thanks

----- Original Message -----
From: Tom Lane
To:  Ian Lipsky <postgres(at)merk(dot)caltech(dot)edu>
Cc:  pgsql-admin(at)postgresql(dot)org
Sent: Mon, 31 May 2004 00:37:40 -0400
Subject: Re: [ADMIN] determining when a database was created

Ian Lipsky <postgres(at)merk(dot)caltech(dot)edu> writes:
> is there a way to tell when a database was created?

Nope, PG doesn't record that anywhere.

You could get an upper bound by looking for the oldest file mod time in
the database's files.  This isn't completely reliable, but unless you're
in the habit of changing system catalogs as obscure as pg_am, it'd
probably be good enough.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org


Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2004-06-01 01:46:50
Subject: Re: determining when a database was created
Previous:From: Jhonatas M. RodríguezDate: 2004-05-31 21:15:23
Subject: a question?..

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group