pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: Simon Riggs <simon@2ndQuadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndQuadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Event Triggers: adding information
Date: Thu, 17 Jan 2013 17:35:51 -0500
Message-ID: <18941.1358462151@sss.pgh.pa.us> (raw )
In-Reply-To: <m2hamfcwc8.fsf@2ndQuadrant.fr >
References: <m2txrsdzxa.fsf@2ndQuadrant.fr >
<m2zk1j9c44.fsf@2ndQuadrant.fr >
<CA+Tgmob6kmAySE5yXvd3uE9LifHunufMg9iU3GmbJ5bpGPiHjQ@mail.gmail.com >
<m2k3sbe51z.fsf@2ndQuadrant.fr >
<CA+TgmoZjOACnHOKrz-eucj3FJXrYJzA-_yjSqajOQR8qkjCi=w@mail.gmail.com >
<m2bodi55yn.fsf@2ndQuadrant.fr >
<CA+TgmoZTxXGAkoyQD0aNOyju1X19SnVfk7KV9fsJCv63bS-C4g@mail.gmail.com >
<m27go1ot1a.fsf@2ndQuadrant.fr >
<20130104205251.GB9191@alvh.no-ip.org >
<m28v88pqin.fsf@2ndQuadrant.fr >
<20130109165829.GB4490@alvh.no-ip.org >
<CA+TgmobykpymdGyfbCDEfS6+-50X-AKYTdK88fjMS4-mY5SBdw@mail.gmail.com >
<m2ehhkrfqk.fsf@2ndQuadrant.fr >
<CA+TgmobfeB_YpgMv5NjW52tG36Hg_DY=jq0XDkE5zwCstPQ4pg@mail.gmail.com >
<m2pq14m7sx.fsf@2ndQuadrant.fr >
<CA+TgmoYEW583z+oisToCYQMz2grzpavdXrCi3-W2D_+nucVhzQ@mail.gmail.com >
<CA+U5nM+Uuh7cyHSJ5wN54twBUGSncJzqpZB83xuZw4VP7UCziQ@mail.gmail.com >
<16675.1358454278@sss.pgh.pa.us >
<m2hamfcwc8.fsf@2ndQuadrant.fr >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> I think that we're not realistically going to be able to introduce
>> event triggers in very many of the places we'd like to have them
>> without first doing a lot of fundamental refactoring.
> We're only talking about ddl_command_start and ddl_command_end now. The
> table_rewrite event is still on the horizon, but is not realistic to get
> in 9.3 anymore, I think :(
> So we're talking about adding some call points only in utility.c, only
> before or after a ddl command is run, including nested sub-commands.
Well, that's already a problem, because as Robert keeps saying, what
goes through utility.c and what doesn't is pretty random right at the
moment, and we shouldn't expose that behavior to users for fear of not
being able to change it later.
I think we could possibly ship event triggers defined as start and end
of a *top level* command and have them working reliably in 9.3. If you
want users to be looking at subcommands, there is a lot more work to do
there than we have any chance of getting done for 9.3 (if it is to ship
in 2013, that is).
Alternatively, if you want to get something into 9.3 that has not
necessarily got a long-term-stable API, I'd be inclined to suggest that
we forget about a SQL-level event trigger facility for now, and just put
in some hook call points. It's pretty well established that we're
willing to change the API seen by hook functions across major releases.
TBH this might be the best thing anyway if your long-term goals have to
do with replication, because it'd be a lot cheaper to get to the point
where you could write the replication code and see if it all actually
works. I'm fairly concerned that we might spend many man-months getting
event triggers with definitions A,B,C into the system, only to find out
later that what is really needed for logical replication is definitions
D,E,F.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
view thread (114+ messages) latest in thread
Message-ID: <18941.1358462151@sss.pgh.pa.us>
Permalink: ../18941.1358462151@sss.pgh.pa.us/
Also on: postgresql.org/message-id/18941.1358462151@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, dimitri@2ndQuadrant.fr, simon@2ndQuadrant.com, robertmhaas@gmail.com, alvherre@2ndQuadrant.com
Subject: Re: Event Triggers: adding information
In-Reply-To: <18941.1358462151@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox