Re: determining when a database was created

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ian Lipsky <postgres(at)merk(dot)caltech(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: determining when a database was created
Date: 2004-05-31 04:37:40
Message-ID: 7024.1085978260@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Paul Gimpelj 2004-05-31 04:44:06 [admin]@postgresql.org pg_database contents ... what happens
Previous Message Tom Lane 2004-05-31 04:30:58 Re: Backend crash