Re: [v9.3] OAT_POST_ALTER object access hooks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [v9.3] OAT_POST_ALTER object access hooks
Date: 2013-03-18 02:57:51
Message-ID: CA+TgmobW49dcRMfbn+ExV_NdBc=b=EgNVQUOwdRbeTvwHAmXBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 12, 2013 at 11:53 AM, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> wrote:
> The attached patch is rebased one towards the latest master.
> It newly added a hook being missed in the previous revision at ALTER
> EVENT TRIGGER ENABLE / DISABLE, and adjusted argument of
> finish_heap_swap() on REFRESH MATERIALIZED VIEW to handle
> it as internal operations.

Thanks. I committed the backend portions of this, but not the sepgsql
and related documentation changes yet. I made some improvements to
the comments along the way. I am not entirely happy with the grotty
hack around ALTER COLUMN SET/DROP DEFAULT. Is there a better
alternative? Do we really need a hook there at all?

The one non-cosmetic change I made was to adjust slightly the firing
point in swap_relation_files. It doesn't make any sense to me to
exclude pg_class here, rather arbitrarily, out of all objects in the
system. This does to some degree raise the question more broadly: is
the point just after CatalogUpdateIndexes() the right rule for where
to put this hook? But I've left it the way you have it for now. Part
of me thinks that what you really want here is a pre-alter hook rather
than a post-alter hook...

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-03-18 03:10:48 Re: pg_test_fsync crashes on systems with POSIX signal handling
Previous Message Tom Lane 2013-03-18 02:52:11 Re: Strange Windows problem, lock_timeout test request