Re: Creation date of postgres database - Mailing list pgsql-admin

From Michael Fuhr
Subject Re: Creation date of postgres database
Date
Msg-id 20060330110626.GA98684@winnie.fuhr.org
Whole thread Raw
In response to Creation date of postgres database  (Pradeep Sharma <pradeep.sharma@in2m.com>)
Responses Re: Creation date of postgres database  (Pradeep Sharma <pradeep.sharma@in2m.com>)
List pgsql-admin
On Thu, Mar 30, 2006 at 02:05:24PM +0530, Pradeep Sharma wrote:
> Is there any way to get the date of creation of a database in Postgres?
> Does postgres store this information in any system table.

I'm not aware that the creation time is stored anywhere (except
perhaps in query logs) but you might be able to infer it from the
modification times of the oldest files in the database's directory.
PG_VERSION looks like a good candidate -- the backend probably
doesn't modify it after the database is created, so if nothing at
the OS level has touched that file then its modification time should
reflect the database's creation time.

--
Michael Fuhr

pgsql-admin by date:

Previous
From: Pradeep Sharma
Date:
Subject: Creation date of postgres database
Next
From: Pradeep Sharma
Date:
Subject: Re: Creation date of postgres database