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 4A20C11F68D4 for ; Thu, 30 Mar 2006 07:07:03 -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 24864-06 for ; Thu, 30 Mar 2006 07:07:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 1F72211F67D7 for ; Thu, 30 Mar 2006 07:07:00 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id k2UB6RbJ018345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 30 Mar 2006 04:06:30 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id k2UB6QMI098881; Thu, 30 Mar 2006 04:06:26 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id k2UB6QFt098880; Thu, 30 Mar 2006 04:06:26 -0700 (MST) (envelope-from mfuhr) Date: Thu, 30 Mar 2006 04:06:26 -0700 From: Michael Fuhr To: Pradeep Sharma Cc: pgsql-admin@postgresql.org Subject: Re: Creation date of postgres database Message-ID: <20060330110626.GA98684@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.121 required=5 tests=[AWL=0.121] X-Spam-Score: 0.121 X-Spam-Level: X-Archive-Number: 200603/369 X-Sequence-Number: 21126 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