Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 275661782AF7 for ; Mon, 2 Apr 2012 16:59:36 -0300 (ADT) Received: from mx2.d2.com ([66.251.81.121]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SEnPX-0005bb-Sp for pgsql-admin@postgresql.org; Mon, 02 Apr 2012 19:59:36 +0000 Received: from mxb.d2.com ([10.85.4.6]) by mx2.d2.com (8.13.8/8.13.8) with ESMTP id q32KtY7n009088 for ; Mon, 2 Apr 2012 13:55:50 -0700 X-ASG-Debug-ID: 1333396735-01d10a6c991b46a0001-ysJW5H Received: from mail01.d2.com ([172.16.66.171]) by mxb.d2.com with ESMTP id JfRWrrgD1RAuhBx3; Mon, 02 Apr 2012 12:58:55 -0700 (PDT) X-Barracuda-Envelope-From: aalvarez@d2.com Received: from exbew2k3-02.d2.com (exbew2k3-02 [10.78.2.16]) by mail01.d2.com (8.13.8/8.13.8/Debian-3) with ESMTP id q32Jws83029475; Mon, 2 Apr 2012 12:58:54 -0700 Received: from [10.126.2.220] ([10.126.2.220] RDNS failed) by exbew2k3-02.d2.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 2 Apr 2012 12:58:54 -0700 Message-ID: <4F7A04FE.8000708@d2.com> Date: Mon, 02 Apr 2012 12:58:54 -0700 From: amador alvarez User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.27) Gecko/20120216 Lightning/1.0b2 Thunderbird/3.1.19 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-admin@postgresql.org Subject: Re: custom conflict resolution information request References: <201203291122317598487@gmail.com> <4F742D48020000250004692A@gw.wicourts.gov> <4F74F9E3.5020807@d2.com> <4F79B0560200002500046AB2@gw.wicourts.gov> X-ASG-Orig-Subj: Re: [ADMIN] custom conflict resolution information request In-Reply-To: <4F79B0560200002500046AB2@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Apr 2012 19:58:54.0250 (UTC) FILETIME=[0823F8A0:01CD110B] X-Barracuda-Connect: UNKNOWN[172.16.66.171] X-Barracuda-Start-Time: 1333396735 X-Barracuda-URL: http://10.85.4.6:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at d2.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.92999 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: NO, score=-2.6 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, RATWARE_GECKO_BUILD autolearn=unavailable version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mx2.d2.com X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/7 X-Sequence-Number: 39343 What are you using for replication? -Kevin Hi Kevin, I set up a master-master asynchronous replication of one database with bucardo 4.4.5 and testing right now 4.99.3. I know the standard settings when a conflict between same id rows comes up : source - the rows on the "source" database always "win" (in a conflict, we copy rows from source to target) target - the rows on the "target" database always win skip - any conflicted rows are simply not replicated. Not recommended for most cases. random - each database has an equal chance of winning each time latest - the row that was most recently changed wins abort - the sync is aborted on a conflict You can also provide custom conflict handlers to allow you to use business logic for better conflict resolution. I have not found info or examples about the custom option yet, and still on the search ... Cheers, Amador A. On 04/02/2012 11:57 AM, Kevin Grittner wrote: > amador alvarez wrote: > >> I am trying to find any kind of information or examples to deal >> with custom conflict resolution on swap syncs in a master-master >> replication. > > What are you using for replication? > > -Kevin