X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 1C1209FB215 for ; Tue, 8 Aug 2006 15:09:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 61603-03 for ; Tue, 8 Aug 2006 18:08:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 8F62C9FB218 for ; Tue, 8 Aug 2006 15:08:56 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 3BC5230E1C; Tue, 8 Aug 2006 20:08:55 +0200 (MET DST) From: Markus Schiltknecht X-Newsgroups: pgsql.hackers Subject: Re: standard interfaces for replication providers Date: Tue, 08 Aug 2006 18:08:52 +0000 Organization: Hub.Org Networking Services Lines: 24 Message-ID: <44D8D334.5050808@bluegap.ch> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Christopher Browne User-Agent: Thunderbird 1.5.0.4 (X11/20060713) In-Reply-To: <87irl3uqgx.fsf@wolfe.cbbrowne.com> To: pgsql-hackers@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.72 tagged_above=0 required=5 tests=SARE_SPEC_REPLICA X-Spam-Level: X-Archive-Number: 200608/494 X-Sequence-Number: 87987 Hello Christopher, Christopher Browne wrote: > Most databases that are interesting to replicate are implemented in C > or C++, thereby implying that a suitably "deep" API needs to be > implemented in C. I generally agree with you. Although it's probably worth mentioning that the API they propose adds hooks to PostgreSQL in the form of triggers. This API comes as a patch is against the PostgreSQL source, thus in C. The nature of triggers in PostgreSQL would then allow to write replication systems in whatever language you prefer, as long as there is a PL/{$LANG} for $LANG = your favorite. 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. Regards Markus