X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 011A49FA621 for ; Tue, 8 Aug 2006 15:37:21 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 27869-01 for ; Tue, 8 Aug 2006 15:37:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from dcs.lsd.di.uminho.pt (linux.di.uminho.pt [193.136.19.96]) by postgresql.org (Postfix) with ESMTP id 0BDF79FB218 for ; Tue, 8 Aug 2006 15:37:17 -0300 (ADT) Received: (qmail 10569 invoked by uid 89); 8 Aug 2006 18:55:32 -0000 Received: from unknown (HELO ?192.168.82.115?) (alfranio@lsd.di.uminho.pt@192.168.82.115) by dcs.lsd.di.uminho.pt with ESMTPA; 8 Aug 2006 18:55:32 -0000 Message-ID: <44D8D9DE.50000@lsd.di.uminho.pt> Date: Tue, 08 Aug 2006 19:37:18 +0100 From: alfranio correia junior User-Agent: Thunderbird 1.5.0.5 (X11/20060728) MIME-Version: 1.0 To: Markus Schiltknecht CC: Christopher Browne , pgsql-hackers@postgresql.org Subject: Re: standard interfaces for replication providers References: <44D30B31.2070403@lsd.di.uminho.pt> <200608041733.24228.jop@lsd.di.uminho.pt> <44D70EDA.9060602@bluegap.ch> <200608071940.26750.jop@lsd.di.uminho.pt> <44D89EA5.5090703@bluegap.ch> <87irl3uqgx.fsf@wolfe.cbbrowne.com> <44D8D334.5050808@bluegap.ch> In-Reply-To: <44D8D334.5050808@bluegap.ch> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.82 tagged_above=0 required=5 tests=AWL, SARE_SPEC_REPLICA X-Spam-Level: X-Archive-Number: 200608/496 X-Sequence-Number: 87989 Markus Schiltknecht wrote: > > I'm questioning if a replication system can be written by only using > triggers as hooks. AFAIK Slony-I uses triggers, so you can probably > better comment on problems or limitations using triggers. For me a > shared library with some hooks as C function calls seems a more > plausible approach. Of course not... It is impossible to build a replication system entirely by only using triggers... But definitely, there is a set of common requirements among a variety of replication systems. Moreover, such requirements are also useful to other systems as well. Roughly, the GAPI reflects any event inside a database system and allows any application to intercept and modify them. For instance, an event might be: 1 - database shutdown, startup 2 - connection shutdown, startup 3 - statement reception 4 - parsing 5 - execution plan generation 6 - tuples written Our current prototype covers some of them and some of them partially (2,6). Besides, we also need the priority mechanism. Best regards, Alfranio Junior.