Re: Keeping creation time of objects

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: daveg <daveg(at)sonic(dot)net>
Cc: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>, PostgreSQL Hackers ML <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Keeping creation time of objects
Date: 2008-09-09 20:22:48
Message-ID: 48C6DB18.5000302@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

daveg wrote:
> On Tue, Sep 09, 2008 at 11:03:56PM +0300, Hannu Krosing wrote:
>
>> On Tue, 2008-09-09 at 12:40 -0700, daveg wrote:
>>
>>
>>> I'd be very interested in seeing a last schema modification time for pg_class
>>> objects. I don't care about it being preserved over dump and restore as my
>>> use case is more to find out when a table was created with a view to finding
>>> out if it is still needed.
>>>
>> Isn't it easier to find out if it is still needed by looking if it is
>> still used, say from pg_stat_user_tables ?
>>
>
> Except that pg_dump will access it and make it look used. Also, this does
> not work for functions, views etc.
>
> It seems to me to be pretty simple to put an abstime or timestamp column
> on the major catalog tables and update it when the row is updated. A mod
> time is more useful probably than a create time.
>
>
>

I must say I'm suspicious of this whole proposal. It looks a whole lot
like data creeping into metadata.

We already have the ability to log just DDL statements, although that's
somewhat incomplete in that it doesn't track DDL performed by functions.

Can someone please give a good, concrete use case for this stuff? "Might
be nice to have" doesn't cut it, I'm afraid. In particular, I'd like to
know why logging statements won't do the trick here.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2008-09-09 20:27:48 Re: Keeping creation time of objects
Previous Message daveg 2008-09-09 20:08:25 Re: Keeping creation time of objects