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: CA+TgmoZ1JKapzW9LwqRUoxh+Ra5Yauiaqr-8f4wCBYbj7Ld2dw@mail.gmail.com (view raw or flat)
Thread:
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
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


In response to

Responses

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-2014 The PostgreSQL Global Development Group