Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id DF2AA12FE952 for ; Thu, 5 Apr 2012 19:33:39 -0300 (ADT) Received: from moutng.kundenserver.de ([212.227.126.186]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SFvFH-0005q4-7J for pgsql-hackers@postgresql.org; Thu, 05 Apr 2012 22:33:39 +0000 Received: from [192.168.11.145] (62.175.246.114.static.riosat.com [62.175.246.114]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0LqkxG-1SkIB13FYo-00eRog; Fri, 06 Apr 2012 00:33:22 +0200 Subject: Re: Last gasp From: Hannu Krosing To: Dimitri Fontaine Cc: Robert Haas , Simon Riggs , PostgreSQL-development In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 06 Apr 2012 00:33:22 +0200 Message-ID: <1333665202.15576.84.camel@hvost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:TlqVDu3X/ckSAAD6KkYNEjgvTXlSD7acNT642fDMoGN txRBh0rbjtI8ZSaW3qLLIaAw5/s9tG9FK7GMUkwslprWbUV3yr BMl+r66HbwwVaioy1JPU7gaQ4zviiCx/LuGdC8tqJNnq/GfXfh E4sv7nyZv1f2lYgv637RdRwHD/Y0bL1T3x1SFctS5bs09/15mu 7hdOBGriALoONIWeFT4ygAmHpooyGnH4Ihm3oajdN3k3QQI30d dimu8HtxdllRrOtv++/gNtxsOd3c+s8i7NY0Hx8w2a0KeY5j1B MJXUcsy2f8PO9LjSZQVAb2rNp6WUdaIoA3MLQw9rtcIw5/OZBK p1wKg4RJMdEu9MG8mtVgdxq3YT6k83NlenDtmabrl X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/287 X-Sequence-Number: 206090 On Fri, 2012-04-06 at 00:02 +0200, Dimitri Fontaine wrote: > Robert Haas 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 >