Re: New Event Trigger: table_rewrite

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New Event Trigger: table_rewrite
Date: 2014-11-17 18:24:46
Message-ID: CA+TgmobO+XhOWjMKrSZFh57jcvUcbeQR_q8zVBSVEZW70fHVSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 16, 2014 at 5:51 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 16 November 2014 06:59, Michael Paquier <michael(dot)paquier(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2014-11-17 18:42:25 Re: 9.5: Better memory accounting, towards memory-bounded HashAgg
Previous Message Robert Haas 2014-11-17 18:15:00 Re: Doing better at HINTing an appropriate column within errorMissingColumn()