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

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: 2012-12-03 14:07:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, Dec 1, 2012 at 2:57 AM, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> wrote:
> * Do we need OAT_POST_ALTER hook even if no fields were updated
>   actually? In case when ALTER SET OWNER, it checks object's ownership
>   only when current and new user-id is not same. Right now, I follow this
>   manner on OAT_POST_ALTER invocation.
>   However, I'm inclined to consider the hook should be invoked when no
>   fields are actually updated also. (It allows extension-side to determine
>   necessity of processing something.)

I agree.  I think it should always be called.
> * When tablespace of relation was changed, it seems to me the point to
>   invoke OAT_POST_ALTER hook should be "after" ATRewriteTable().
>   However, it usually long time to rewrite whole the table if it already have
>   large number of rows. I'm not 100% certain to put hook here, so this
>   version does not support hook when tablespace changes.

Well, if it's a post-alter hook, it should presumably happen as close
to the end of processing as possible.   But are you sure that's really
what you want?  I would think that for SE-Linux you'd be wanting to
get control much earlier in the process.

Robert Haas
The Enterprise PostgreSQL Company

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2012-12-03 14:08:35
Subject: Re: Hot Standby Feedback should default to on in 9.3+
Previous:From: Robert HaasDate: 2012-12-03 14:03:33
Subject: Re: [v9.3] OAT_POST_ALTER object access hooks

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