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 AECBA9FB2C4 for ; Wed, 9 Aug 2006 15:56:26 -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 34735-03 for ; Wed, 9 Aug 2006 18:56:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 9233F9FB2C2 for ; Wed, 9 Aug 2006 15:56:12 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 2448156427; Wed, 9 Aug 2006 13:56:11 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 9 Aug 2006 13:56:09 -0500 Date: Wed, 9 Aug 2006 13:56:09 -0500 From: "Jim C. Nasby" To: Markus Schiltknecht Cc: alfranio correia junior , Christopher Browne , pgsql-hackers@postgresql.org Subject: Re: standard interfaces for replication providers Message-ID: <20060809185609.GK40481@pervasive.com> 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> <44D8D9DE.50000@lsd.di.uminho.pt> <44D98FCF.90408@bluegap.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44D98FCF.90408@bluegap.ch> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060809:markus@bluegap.ch::LwxYhlE9iXXrBAHc:00000000000000000000 00000000000000000000000019mY X-Hashcash: 1:20:060809:alfranio@lsd.di.uminho.pt::9o4tHi5R1lRQB1X0:000000000000 00000000000000000000000050Xv X-Hashcash: 1:20:060809:cbbrowne@acm.org::+SKSC4gJdljSwjMK:039c4 X-Hashcash: 1:20:060809:pgsql-hackers@postgresql.org::Xr4QR8XH2EyLeaa7:000000000 000000000000000000000000CRvr 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/618 X-Sequence-Number: 88111 On Wed, Aug 09, 2006 at 07:33:35AM +0000, Markus Schiltknecht wrote: > Hello Alfranio, > > alfranio correia junior wrote: > >Of course not... > >It is impossible to build a replication system entirely by only using > >triggers... > > Hm, I don't think it's impossible, just unpractical. Anyway, if you say > so yourself, I really doubt the use of GAPI. If you need to create your > own hooks anyway beside GAPI, why use GAPI at all? Better have one kind > of 'hooking' (i.e. with a dynamically loaded library). Why reinvent the wheel for everything if there was an interface that offered some of the needed functionality? Maybe PostgreSQL-R is simply too deep in the database for any of this to be useful, but I'm 99% certain that Slony could make use of some of this stuff, such as a hook on tuples being written out. Likewise, if there were hooks for WAL records and a way to inject WAL info into a backend it probably wouldn't be too hard to build WAL-based replication on top of that. Heck, PITR could probably be refactored to use such hooks. One of the great things about Oracle is that they expose a hell of a lot of the technology they use to build features like replication; ie: take a look at DBMS_*. > >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. > > So far, they are only partly usable for replication. I never looked into > materialized views or anything else that would benefit from such triggers. > > Regards > > Markus > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461