Re: proposal: add columns created and altered to pg_proc and pg_class

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: add columns created and altered to pg_proc and pg_class
Date: 2009-04-14 03:58:59
Message-ID: 603c8f070904132058j79c3376eg6c4864ec682f7fae@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 13, 2009 at 7:06 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> I would suggest putting this info in a separate table, pg_change.  It
>> would have oid, catalog, user_changed, changed_on.  That way we could
>> simply keep the data for all objects which have an OID.
>
> That makes more sense to me --- it would easily extend to all cases
> and would not impose any overhead (in the form of useless columns)
> for catalogs that you didn't want to track in a particular case.
>
> The main problem that would have to be considered is how to flush
> no-longer-useful entries (which of course entails deciding which
> those are).

I kinda think that the only thing that's going to make sense here is
to drop the pg_change entries when the object is dropped. Now,
admittedly, that means you can't track drops. But otherwise, you have
the potential for pg_change to get really big and full of cruft, and I
don't think there's going to be an easy way to garbage collect it.

I really like the basic design, though.

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2009-04-14 04:07:02 Re: proposal: add columns created and altered to pg_proc and pg_class
Previous Message Robert Haas 2009-04-14 03:56:45 Re: join ordering