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

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 (view raw or flat)
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

pgsql-admin by date

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

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