From: Enrico Weigelt <weigelt@metux.de>
To: pgsql-admin@postgresql.org
Subject: Re: Multi-Master Replication
Date: Sat, 6 Mar 2004 02:55:11 +0000
Message-ID: <20040306025510.GA16521@nibiru.metux.de> (raw)
In-Reply-To: <A799F7647794D311924A005004ACEA970D20995B@cprodamibs249.prodam>
References: <A799F7647794D311924A005004ACEA970D20995B@cprodamibs249.prodam>
* Elielson Fontanezi <ElielsonF@prodam.sp.gov.br> [2004-03-02 15:47:13 -0300]:
Hi,
> I am in the need of using some multi-master replication for
> postgres.
I've implemented something in php. All my applications do their database
access layer, where they only touch whole objects (the structure of
each object class is modeled in class descriptors) - so it is quite
easily solvable.
But this works only under certain conditions:
* all objects have an inode_id (as cluster-wide oid) and mtime field.
* on create (in sql speaking: insert) a new inode_id is allocated
from the inode_id sequence. this sequences has to be adjusted
carefully so each cluster node gets its own id space.
* on each write access, the mtime has to be set to the current time.
* from time to time (i.e. once per minute) a pollout script runs
over the object classes and fetches out the new records (by timestamp).
they are the posted to the other nodes.
(not necessarily to all - you can define sync neighbours on each node)
Well, this is no general solution, but under some conditions
(which are btw design rules for all my database applications),
this works quite well.
regards,
--
---------------------------------------------------------------------
Enrico Weigelt == metux IT services
phone: +49 36207 519931 www: http://www.metux.de/
fax: +49 36207 519932 email: contact@metux.de
cellphone: +49 174 7066481
---------------------------------------------------------------------
-- DSL-Zugang ab 0 Euro. -- statische IP -- UUCP -- Hosting --
---------------------------------------------------------------------
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: weigelt@metux.de
Subject: Re: Multi-Master Replication
In-Reply-To: <20040306025510.GA16521@nibiru.metux.de>
References: <A799F7647794D311924A005004ACEA970D20995B@cprodamibs249.prodam> <20040306025510.GA16521@nibiru.metux.de>
* 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