X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3500E11F600D for ; Thu, 30 Mar 2006 07:48:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30203-06 for ; Thu, 30 Mar 2006 07:48:09 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from in2m.com (unknown [202.68.136.247]) by postgresql.org (Postfix) with SMTP id 37B0411F68DC for ; Thu, 30 Mar 2006 07:48:06 -0400 (AST) Received: (qmail 13805 invoked from network); 30 Mar 2006 11:48:00 -0000 Received: from unknown (HELO pradeep) (202.68.136.242) by in2m.com with SMTP; 30 Mar 2006 11:48:00 -0000 Date: Thu, 30 Mar 2006 17:20:00 +0530 From: Pradeep Sharma X-X-Sender: pradeep@linux.site To: Michael Fuhr cc: pgsql-admin@postgresql.org Subject: Re: Creation date of postgres database In-Reply-To: <20060330110626.GA98684@winnie.fuhr.org> Message-ID: References: <20060330110626.GA98684@winnie.fuhr.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.08 required=5 tests=[AWL=0.080] X-Spam-Score: 0.08 X-Spam-Level: X-Archive-Number: 200603/370 X-Sequence-Number: 21127 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 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 >