From: root <root@generalogic.com>
To: pgsql-hackers@postgresql.org
Subject: Re: AW: Postgres Replication
Date: Tue, 12 Jun 2001 12:36:23 +0530
Message-ID: <20010612123623O.root@generalogic.com> (raw)
In-Reply-To: <20010612.13321600@j2.us.greatbridge.com>
References: <Pine.BSF.4.33.0106120605130.411-100000@mobile.hub.org>
<20010612.13321600@j2.us.greatbridge.com>
Hello
I have hacked up a replication layer for Perl code accessing a
database throught the DBI interface. It works pretty well with MySQL
(I can run pre-bender slashcode replicated, haven't tried the more
recent releases).
Potentially this hack should also work with Pg but I haven't tried
yet. If someone would like to test it out with a complex Pg app and
let me know how it went that would be cool.
The replication layer is based on Eric Newton's Recall replication
library (www.fault-tolerant.org/recall), and requires that all
database accesses be through the DBI interface.
The replicas are live, in that every operation affects all the
replicas in real time. Replica outages are invisible to the user, so
long as a majority of the replicas are functioning. Disconnected
replicas can be used for read-only access.
The only code modification that should be required to use the
replication layer is to change the DSN in connect():
my $replicas = '192.168.1.1:7000,192.168.1.2:7000,192.168.1.3:7000';
my $dbh = DBI->connect("DBI:Recall:database=$replicas");
You should be able to install the replication modules with:
perl -MCPAN -eshell
cpan> install Replication::Recall::DBServer
and then install DBD::Recall (which doesn't seem to be accessible from
the CPAN shell yet, for some reason), by:
wget http://www.cpan.org/authors/id/AGUL/DBD-Recall-1.10.tar.gz
tar xzvf DBD-Recall-1.10.tar.gz
cd DBD-Recall-1.10
perl Makefile.PL
make install
I would be very interested in hearing about your experiences with
this...
Thanks
#!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: root@generalogic.com
Subject: Re: AW: Postgres Replication
In-Reply-To: <20010612123623O.root@generalogic.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox