Re: Re: Proposal: Store "timestamptz" of database creation on "pg_database"

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Hannu Krosing <hannu@2ndquadrant.com>
Cc: Stephen Frost <sfrost@snowman.net>, Andres Freund <andres@2ndquadrant.com>, Dimitri Fontaine <dimitri@2ndquadrant.fr>, Tom Lane <tgl@sss.pgh.pa.us>, Josh Berkus <josh@agliodbs.com>, pgsql-hackers@postgresql.org
Date: 2013-01-03T17:27:45Z
Lists: pgsql-hackers
On Thu, Jan 3, 2013 at 11:15 AM, Hannu Krosing <hannu@2ndquadrant.com> wrote:
> This is what I did with my sample pl/python function ;)

Yeah, except that the "c" in "ctime" does not stand for create, and
therefore the function isn't necessarily reliable.  The problem is
even worse for tables, where a rewrite may remove the old file and
create a new one.  I mean, I'm not stupid about this: when I need to
figure this kind of stuff out, I do in fact look at the file times -
mtime, ctime, atime, whatever there is.  Sometimes that turns out to
be helpful, and sometimes it doesn't.  An obvious example of the
latter is when you're looking at a bunch of files that have just been
untarred from a backup device.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company