Re: Add relcreated (timestamp) column to pg_class catalog to record the time an object was created

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>
Cc: Kevin Grittner <kgrittn(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Add relcreated (timestamp) column to pg_class catalog to record the time an object was created
Date: 2016-04-21 00:01:07
Message-ID: 57181843.6060003@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/20/2016 04:33 PM, Melvin Davidson wrote:
>
>

>
>
> "Not until pg_upgrade is done or replication is started, in either case
> a new cluster is started probably at a different time from the original
> cluster."
> Not true, whether an upgrade or rep[lication, the relcreatedat time will
> not/cannot change. It will only change if a new database is created.

We will have to agree to disagree.

I just cannot see that in the following:

pg_upgrade 9.4 --> 9.5

The 9.5 database is the same as the 9.4 one.

Also in replication case:

Master --> Standby
Master dies
Standby gets promoted to new Master.
STONITH the original Master
Work continues on the new Master.
The old Master is resurrected as a new Standby.

To me it would be important to know when the objects actually appeared
in the various databases as a way of figuring what the above timeline was.

>
>
> Second thing:
>
> "pg_class does not track all the objects in a database, so what other
> system catalogs should be included. With the same questions as above."
> I am only concerned with the objects in pg_class as id'd by relkind. IE:
> tables, indexes, sequences, etc.
>
>
> "Again, that is your wish and is fairly simple. Now I usually do not
> make guarantees, but in this case I will. If pg_class gets an object
> creation time, the clamor will start immediately for the same thing to
> be done to the other relevant system catalogs."
>
> Fine. As per precedent set today, that is exactly what this list is for.
> Now that I have initialized the request and started the discussion, that
> is exactly the kind of feedback I want and the developers should take
> note of.
>
> --
> *Melvin Davidson*
> I reserve the right to fantasize. Whether or not you
> wish to share my fantasy is entirely up to you.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karl Czajkowski 2016-04-21 00:18:32 RLS policy dump/restore failure due to elided type-casts
Previous Message Melvin Davidson 2016-04-20 23:33:06 Re: Add relcreated (timestamp) column to pg_class catalog to record the time an object was created