X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F20EED79A1 for ; Wed, 24 Aug 2005 21:46:38 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53962-02 for ; Thu, 25 Aug 2005 00:46:35 +0000 (GMT) Received: from edtnas67.telus.net (edtnas67.telus.net [204.209.193.89]) by svr1.postgresql.org (Postfix) with ESMTP id 27966D7271 for ; Wed, 24 Aug 2005 21:46:34 -0300 (ADT) Received: from edtnas67.telus.net ([204.209.193.89]) by edtnas67.telus.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.50) id 1E85t5-0002HH-Ki; Wed, 24 Aug 2005 18:46:35 -0600 Message-ID: <430D14EA.50502@telus.net> Date: Wed, 24 Aug 2005 18:46:34 -0600 From: Aly Dharshi User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: William Yu Cc: pgsql-general@postgresql.org Subject: Re: Postgresql replication References: <60fyszpby5.fsf@dba2.int.libertyrms.com> <20050824173106.76233.qmail@web53210.mail.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.996 required=5 tests=[AWL=-0.380, DNS_FROM_RFC_POST=1.376] X-Spam-Level: X-Archive-Number: 200508/1251 X-Sequence-Number: 82659 I know I am wadding into this discussion as an beginner compared to the r= est who=20 have answered this thread, but doesn't something like pgpool provide reli= ef for=20 pseudo-multimaster replication, and what about software like sqlrelay wou= ldn't=20 these suites help to some extent ? Looking forward to be enlightened. Cheers, Aly. William Yu wrote: > Carlos Henrique Reimer wrote: >=20 >> I read some documents about replication and realized that if you plan = >> on using asynchronous replication, your application should be designed= =20 >> from the outset with that in mind because asynchronous replication is = >> not something that can be easily =93added on=94 after the fact. >=20 >=20 > Yes, it requires a lot foresight to do multi-master replication --=20 > especially across high latency connections. I do that now for 2=20 > different projects. We have servers across the country replicating data= =20 > every X minutes with custom app logic resolves conflicting data. >=20 > Allocation of unique IDs that don't collide across servers is a must.=20 > For 1 project, instead of using numeric IDs, we using CHAR and=20 > pre-append a unique server code so record #1 on server A is A0000000001= =20 > versus ?x0000000001 on other servers. For the other project, we were to= o=20 > far along in development to change all our numerics into chars so we=20 > wrote custom sequence logic to divide our 10billion ID space into=20 > 1-Xbillion for server 1, X-Ybillion for server 2, etc. >=20 > With this step taken, we then had to isolate (1) transactions could run= =20 > on any server w/o issue (where we always take the newest record), (2)=20 > transactions required an amalgam of all actions and (3) transactions ha= d=20 > to be limited to "home" servers. Record keeping stuff where we keep a=20 > running history of all changes fell into the first category. It would=20 > have been no different than 2 users on the same server updating the sam= e=20 > object at different times during the day. Updating of summary data fell= =20 > into category #2 and required parsing change history of individual=20 > elements. Category #3 would be financial transactions requiring strict = > locks were be divided up by client/user space and restricted to the=20 > user's home server. This case would not allow auto-failover. Instead, i= t=20 > would require some prolonged threshold of downtime for a server before = > full financials are allowed on backup servers. >=20 > ---------------------------(end of broadcast)--------------------------= - > TIP 6: explain analyze is your friend --=20 Aly S.P Dharshi aly.dharshi@telus.net "A good speech is like a good dress that's short enough to be interesting and long enough to cover the subject"