Skip site navigation (1) Skip section navigation (2)

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

From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)2ndquadrant(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: Proposal: Store "timestamptz" of database creation on "pg_database"
Date: 2013-01-03 16:15:31
Message-ID: 50E5AEA3.4070002@2ndQuadrant.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 01/03/2013 03:09 PM, Robert Haas wrote:
> On Thu, Jan 3, 2013 at 8:46 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com> wrote:
>> How is "what does database creation date mean?" a different question ?
>>
>> It is same question as :
>>
>> what is the creation date of db when I create a replica of my database from
>> backup?
>>
>> does it depend on how I restore my replica ?
>>
>> can I restore it from pg_dump and still have same creation date ?
>>
>> etc. etc.
...
> Of course, these objections miss the point.  Even an imperfect
> solution will be better than no solution at all.  And it is very
> likely that if we simply provide whatever hydrating agent lies closest
> to hand, we'll get full marks.
This is what I did with my sample pl/python function ;)
> Similarly, in the present situation, I believe that there is little
> reason to suppose that the simplest possible implementation of this
> feature won't resolve the overwhelming majority of the needs that
> people have.  We have many features about which users might raise the
> same kinds of questions that you are raising about this one, and they
> do, and those questions are perfectly valid.  But they are not reasons
> to remove those features, and the questions you raise are not reasons
> to avoid having this one.  They are simply things that must be
> documented and explained, just as we need to do with every other
> feature we ship.  And if someone is not perfectly happy with the
> design, it won't be the first time for that, either.  It does not mean
> that it's worse than not having anything.
>
If we made sure that things like CLUSTER or moving to
another tablespace would keep file ctime, then this would
answer 98% of requests .

Even without keeping them, this would be giving the chap "water" ...

So my proposal is to just have a pg_database_createtime(dbname)
function and solve the simple part of the problem.

-----------------
Hannu



In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2013-01-03 16:17:33
Subject: Re: Proposal: Store "timestamptz" of database creation on "pg_database"
Previous:From: Tom LaneDate: 2013-01-03 15:41:45
Subject: Re: dynamic SQL - possible performance regression in 9.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group