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: (view raw, whole thread or download thread mbox)
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] 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-2017 The PostgreSQL Global Development Group