From: Dirk Heinrichs <heini@chaos.tng.oche.de>
To: pgsql-admin@postgresql.org
Subject: Some thoughts on replication
Date: Thu, 25 Jan 2001 18:45:11 +0100
Message-ID: <01012518451100.12641@linux> (raw)
Hi folks,
Maybe this belongs to the developers mailing list, but I'm not subscribed to
that list, so I post it here.
I've read through todo list on the website, especially the planned
replication feature. It seems to me that implementing replication into
postgresql is a rather hard and longterm task.
I want to show two possible alternatives, used in a real world application (a
billing system based on Informix) I was involved in a few years ago.
In our case we didn't need (or want) to replicate the whole database, but
only a few tables. The first thing was to use synonym tables. In Infomix one
can just type something like
create synonym mysynonym for table mytable:somedb@somehost;
where the somedb and somehost values are optional. It was then possible to
work on the synonym as if it where a normal table.
Later, we also did table replication based on triggers, a daemon and a
configuration table. The tables which had to be replicated where entered in
the config table, together with their destination. Then a little script was
used to setup the apprpriate insert, update and delete triggers for those
tables. When one of the triggers fired, the daemon contacted its friend on
the other host and did the same action on the remote database. I think there
was also a timestamp in the config table which had to be updated. I don't
know more details anymore, but that was roughly the concept.
Maybe one of those two (or both) is easier and faster to realise than
database replication.
Any comments?
Bye...
Dirk
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: heini@chaos.tng.oche.de
Subject: Re: Some thoughts on replication
In-Reply-To: <01012518451100.12641@linux>
References: <01012518451100.12641@linux>
* 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