Re: New Event Trigger: table_rewrite - Mailing list pgsql-hackers

From Robert Haas
Subject Re: New Event Trigger: table_rewrite
Date
Msg-id CA+TgmobO+XhOWjMKrSZFh57jcvUcbeQR_q8zVBSVEZW70fHVSg@mail.gmail.com
Whole thread Raw
In response to Re: New Event Trigger: table_rewrite  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Sun, Nov 16, 2014 at 5:51 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On 16 November 2014 06:59, Michael Paquier <michael.paquier@gmail.com> wrote:
>> 1) This patch is authorizing VACUUM and CLUSTER to use the event
>> triggers ddl_command_start and ddl_command_end, but aren't those
>> commands actually not DDLs but control commands?
>
> I could go either way on that. I'm happy to remove those from this commit.

Yeah, this patch definitely shouldn't change the set of commands to
which existing event triggers apply as a side-effect.  There's no
reason new DDL commands need to apply to the same set of operations as
existing DDL commands, but the existing ones shouldn't be changed
without specific discussion and agreement.

It seems pretty weird, also, that the event trigger will fire after
we've taken AccessExclusiveLock when you cluster a particular
relation, and before we've taken AccessExclusiveLock when you cluster
database-wide.  That's more or less an implementation artifact of the
current code that we're exposing to the use for, really, no good
reason.

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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Doing better at HINTing an appropriate column within errorMissingColumn()
Next
From: Tomas Vondra
Date:
Subject: Re: 9.5: Better memory accounting, towards memory-bounded HashAgg