From: Pradeep Sharma <pradeep.sharma@in2m.com>
To: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: Creation date of postgres database
Date: Thu, 30 Mar 2006 17:20:00 +0530
Message-ID: <Pine.LNX.4.63.0603301715350.13116@linux.site> (raw)
In-Reply-To: <20060330110626.GA98684@winnie.fuhr.org>
References: <Pine.LNX.4.63.0603301403050.6505@linux.site>
<20060330110626.GA98684@winnie.fuhr.org>
On Thu, 30 Mar 2006, Michael Fuhr wrote:
> 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.
Micheal,
Thanks for the reply. But I guess there is some communication gap between
me and you regarding this topic. As I understood from your reply is, you
are talking about the date of Postgres setup/installation/upgrade.
Am I right?
If I am right then sorry for the miscommunication. Please let me clarify
my question again.
Suppose I created a new database using the command:
CREATE DATABASE <database_name>
I want to know how can I get created date of the above database.
Thanks once again
--
Pradeep
>
> --
> Michael Fuhr
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: pradeep.sharma@in2m.com, mike@fuhr.org
Subject: Re: Creation date of postgres database
In-Reply-To: <Pine.LNX.4.63.0603301715350.13116@linux.site>
References: <Pine.LNX.4.63.0603301403050.6505@linux.site> <20060330110626.GA98684@winnie.fuhr.org> <Pine.LNX.4.63.0603301715350.13116@linux.site>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox