From: Greg Stark <gsstark@mit.edu>
To: William Yu <wyu@talisys.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Postgresql replication
Date: 24 Aug 2005 20:39:50 -0400
Message-ID: <877jeaetnt.fsf@stark.xeocode.com> (raw)
In-Reply-To: <deivg4$ura$1@news.hub.org>
References: <60fyszpby5.fsf@dba2.int.libertyrms.com>
<20050824173106.76233.qmail@web53210.mail.yahoo.com>
<deivg4$ura$1@news.hub.org>
William Yu <wyu@talisys.com> writes:
> Allocation of unique IDs that don't collide across servers is a must. For 1
> project, instead of using numeric IDs, we using CHAR and pre-append a unique
> server code so record #1 on server A is A0000000001 versus ?x0000000001 on other
> servers. For the other project, we were too far along in development to change
> all our numerics into chars so we wrote custom sequence logic to divide our
> 10billion ID space into 1-Xbillion for server 1, X-Ybillion for server 2, etc.
I would have thought setting the sequences to "INCREMENT BY 100" would let you
handle this simply by setting the sequences on each server to start at a
different value modulo 100.
I wonder if it might be handy to be able to set default sequence parameters on
a per-database level so that you could set this up and then just do a normal
pg_restore of the same schema and get proper non-conflicting sequences on each
server.
I suppose it's the least of your problems though.
--
greg
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-general@postgresql.org
Cc: gsstark@mit.edu, wyu@talisys.com
Subject: Re: Postgresql replication
In-Reply-To: <877jeaetnt.fsf@stark.xeocode.com>
References: <60fyszpby5.fsf@dba2.int.libertyrms.com> <20050824173106.76233.qmail@web53210.mail.yahoo.com> <deivg4$ura$1@news.hub.org> <877jeaetnt.fsf@stark.xeocode.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