Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id D71499F9D99 for ; Thu, 16 Nov 2006 15:13:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 63363-09 for ; Thu, 16 Nov 2006 19:13:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 859AA9F9998 for ; Thu, 16 Nov 2006 15:13:01 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from ctb-mesg4.saix.net (ctb-mesg4.saix.net [196.25.240.74]) by svr4.postgresql.org (Postfix) with ESMTP id 826795AF90E for ; Thu, 16 Nov 2006 19:12:58 +0000 (GMT) Received: from [192.168.0.13] (dsl-243-128-130.telkomadsl.co.za [41.243.128.130]) by ctb-mesg4.saix.net (Postfix) with ESMTP id 836D76111; Thu, 16 Nov 2006 21:12:53 +0200 (SAST) Message-ID: <455CB832.9060100@mira.net> Date: Thu, 16 Nov 2006 21:12:50 +0200 From: Naz Gassiep User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: TomDB Cc: pgsql-admin@postgresql.org Subject: Re: replication? References: <322616614.20061113222140@uk2.net> <20061114171835.GY90133@nasby.net> <1807736772.20061114221053@uk2.net> In-Reply-To: <1807736772.20061114221053@uk2.net> Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.537 tagged_above=0 required=5 tests=BAYES_40, HTML_MESSAGE, MIME_HTML_ONLY, SARE_SPEC_REPLICA X-Spam-Level: X-Archive-Number: 200611/166 X-Sequence-Number: 23693 Why not just have a primary key with 2 columns, one of which is a serial and the other is a "siteid" or "installid" that is different for each server?

TomDB wrote:
would there be any default available field (like the OID of the
records) that would be unique in the two versions of the datbase?
there isn't "by accident" something like a unique UID like an MD5 or
something... ?

cause if there is no replication available, I'd consider this
(together with PHP)

a) replacing the serial fields by generated UID's (md5 of ID + a
string that depends on the install) 
or
b) start the autoincrement field at a high number in the second
install (since I can estimate that there will never by > 10 000
records)

+ store all queries that were performed & run them in the
network-master afterwards.




  
I'd like to create a setup where there are exactly 2 masters which
need to be synchronized against each other. The two masters should
have read+write access, but don't have a permanent connection to each
other. One will be on a LAN-server, the other instance will be
installed on a Windows-client-laptop which can be taken along the
road. When coming back to the office, we need to sync the changed
data.

is there any tool that will allow me to do so ?
      

  
If you got *really* clever you could maybe pull it off with Slony, but
in general, no, this isn't possible.