From: Hannu Krosing <hannu@krosing.net>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Last gasp
Date: Fri, 06 Apr 2012 00:33:22 +0200
Message-ID: <1333665202.15576.84.camel@hvost> (raw)
In-Reply-To: <m2ty0xon0s.fsf@2ndQuadrant.fr>
References: <CA+U5nML0w7FAM8Wi6W1ObSa160ipN5shg3Z0y91ew-Um8iXxCg@mail.gmail.com>
<CA+TgmoazMq6FF2otE_5HYJr3nwwEy9_0TmGYu_G3AsY8ckQcjg@mail.gmail.com>
<CA+U5nMJLg6aDi-0LOZXx6HMnEKE6-GY7pbCbjTXkQvfSwEb+qw@mail.gmail.com>
<CA+Tgmoaf=b+QNcR+CZE6TfK-DN=BNV2xDikVZwdreuiC+PnrrQ@mail.gmail.com>
<m2ty0xriu2.fsf@2ndQuadrant.fr>
<CA+Tgmob7vp0CgZCVU3+Drdpyf=weboQ6WesJ8g0-DptxN4JSwg@mail.gmail.com>
<m2ty0xon0s.fsf@2ndQuadrant.fr>
On Fri, 2012-04-06 at 00:02 +0200, Dimitri Fontaine wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > Huh? AFAICS, there are vestiges of the old terminology all over the
> > patch, although some very incomplete renaming has been done. I'm
> > pretty sure you haven't made the firing points consistent either,
> > although I'd have to spend more time reviewing to be sure of that.
>
> I've choosen to internally have command triggers built in an event
> trigger framework, because clearly the only kind of events we have an
> idea how to manage are commands here. Don't generalize an API with only
> one use case, etc. So internally it's very much command oriented, while
> the usage is all about "events".
>
> The firing point didn't move yet, I finished the mechanism. It's now
> about picking the right event name for each of them, I've begin to
> explore about that in aggregatecmds.c already. So I think that's only a
> policy issue now when it was just impossible some days ago.
>
> > I think it's fair to say that there's probably another month of work
> > here to get this committed. It is, of course, up to the community as
> > a whole whether they want to delay 9.2 another month for this and
> > perhaps other patches that are not yet done. But the idea that we're
> > going to pull it together into committable form in the next 24 hours
> > is not realistic.
>
> All of that depends on what you want to see commit, I'm still under the
> illusion that parts of it are going to be salvaged.
I would really like the controversial parts of the recent feature creep
to get un-creeped :)
At least until 9.3 .
> For example we could
> decide to implement "command_start" and "commend_end" in utility.c and
> remove all special variables support apart from the parse tree for user
> functions written in C. That would already be something.
I would need only one of those - just something to record the DDL
command that was done.
I'd prefer to get "command_end" triggers if "command_start" would mean
it could fail later.
CREATE TRIGGER AFTER ANY DDL EXECUTE record_ddl();
My next wish after the above is available would be triggers on
BEGIN/ROLLBACK/COMMIT to implement "streaming" and possibly also
"synchronous" logical replication - the current logical replication
systems rely on trigger-gathered events only being available after
commit and so don't need to get notified about COMMIT/ROLLBACK.
CREATE TRIGGER AFTER BEGIN EXECUTE remote_transaction_begin_();
CREATE TRIGGER AFTER ROLLBACK EXECUTE remote_transaction_rollback();
CREATE TRIGGER AFTER COMMIT EXECUTE remote_transaction_commit();
> Of course as I wasn't running for that outcome that's not what you
> currently see in the branch.
I would very much like to see the stripped down, after command only
version to get into 9.2
I would not mind at all waiting a week or two for this to happen.
And i promise I will keep a very keen eye on further development and
also will start testing right away for it being sufficient for DDL
replication as soon as the stripping is completed :)
Also, I suspect that the rest of the "event" trigger functionality could
better be served as simple hooks anyway, at least until we have some
good real life use-case to test against before working on a more
involved implementation.
> Regards,
> --
> Dimitri Fontaine
> http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
>
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: hannu@krosing.net, dimitri@2ndQuadrant.fr, robertmhaas@gmail.com, simon@2ndquadrant.com
Subject: Re: Last gasp
In-Reply-To: <1333665202.15576.84.camel@hvost>
* 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