Re: sql_drop Event Trigger

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sql_drop Event Trigger
Date: 2013-02-06 17:05:35
Message-ID: CA+TgmoYhWpHagd8R6ZG5AzY+PdMFsiUAqBLfynGfDejcdPgjRQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 6, 2013 at 9:44 AM, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> I disagree with that. I don't see why the enclosing event trigger
>>> shouldn't be aware of all the objects dropped by the command that just
>>> ran to completion, *including* the effects of any event trigger fired
>>> recursively or not.
>>
>> Well, that could result in some DROP events being reported more than
>> once, which I assume would be undesirable for someone hoping to use
>> this for replication.
>
> Any command might have an event trigger attached doing a DROP, so that
> you don't know where to expect it, and it's well possible that in your
> example both the event triggers have been installed by different tools.

It certainly is; in fact, it's likely. So let's say that B is a
replication trigger. Don't you want it to hear about each drop
exactly once? If not, how will you avoid errors when you go to replay
the events you've captured on another machine?

--
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 Phil Sorber 2013-02-06 17:14:01 Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)
Previous Message Merlin Moncure 2013-02-06 16:58:13 Re: Alias hstore's ? to ~ so that it works with JDBC