Received: from bruce-guenter.dyndns.org (hsregn1-202.sk.sympatico.ca [142.165.128.202]) by hub.org (8.10.1/8.10.1) with SMTP id e8MG8Cs15298 for ; Fri, 22 Sep 2000 12:08:12 -0400 (EDT) Received: (qmail 1815 invoked by uid 500); 22 Sep 2000 16:08:06 -0000 Date: Fri, 22 Sep 2000 10:08:06 -0600 From: Bruce Guenter To: Tom Lane Cc: pgsql-general@postgresql.org Subject: Re: replication Message-ID: <20000922100806.A1676@em.ca> References: <001d01c023ca$e37d9cc0$330a0a0a@Adam> <39CB1120.DBEC91AB@haneke.de> <20000922093102.A1715@em.ca> <29326.969638593@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <29326.969638593@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Fri, Sep 22, 2000 at 12:03:13PM -0400 X-Archive-Number: 200009/662 --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 22, 2000 at 12:03:13PM -0400, Tom Lane wrote: > Bruce Guenter writes: > > I've been thinking that one way to emulate replication would be to run a > > pgsql "shim" that would redirect queries to two back-ends > > simultaneously, creating transactions for update commands, and aborting > > when necessary. The shim would be a long-running gateway process, that > > could check for data consistency when it started up. This is all off > > the top of my head, so is this at all a reasonable idea? >=20 > Awhile back, someone reported that they were successfully using exactly > this idea. Check the PG list archives (sorry, I forget which list). Cool! I'll take a look. > I'm not convinced that this scales real well to multiple concurrent > clients ... at the very least, you'd need a single gateway that > serializes all the requests. Or multiple gateways, one "near" each database server, that try to keep some synchronization with each other. > You might still have problems with the > two databases not executing requests in exactly the same order. > Also > it'd be really dangerous to use OIDs as a way of identifying rows in > application queries. Oh, definitely agreed. OIDs go out the window, unless both servers have have identical queries delivered to them at all times. This is rather difficult to guarantee. --=20 Bruce Guenter http://em.ca/~bruceg/ --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.1 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE5y4Pm6W+y3GmZgOgRArNsAJ9uhvli2ehTJMoiAX/+kgCCtZSgTgCfYDbW PalID8xkvMh2xU/kHBln9QI= =n2+I -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO--