Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 5839E5EC6B9; Mon, 16 Jan 2012 14:51:47 -0400 (AST) Received: from db3ehsobe003.messaging.microsoft.com ([213.199.154.141] helo=DB3EHSOBE003.bigfish.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rmreh-0002BO-GF; Mon, 16 Jan 2012 18:51:46 +0000 Received: from mail101-db3-R.bigfish.com (10.3.81.249) by DB3EHSOBE003.bigfish.com (10.3.84.23) with Microsoft SMTP Server id 14.1.225.23; Mon, 16 Jan 2012 18:51:26 +0000 Received: from mail101-db3 (localhost [127.0.0.1]) by mail101-db3-R.bigfish.com (Postfix) with ESMTP id DE8C8320620; Mon, 16 Jan 2012 18:51:26 +0000 (UTC) X-SpamScore: -16 X-BigFish: VPS-16(zzbb2dI9371I1432N14e3M98dKzz1202hzzz2fhc1ahc1bh2a8h668h839h) X-Forefront-Antispam-Report: CIP:64.62.153.98; KIP:(null); UIP:(null); IPV:NLI; H:mail.nimblestorage.com; RD:none; EFVD:NLI Received-SPF: pass (mail101-db3: domain of nimblestorage.com designates 64.62.153.98 as permitted sender) client-ip=64.62.153.98; envelope-from=manoj@nimblestorage.com; helo=mail.nimblestorage.com ; estorage.com ; Received: from mail101-db3 (localhost.localdomain [127.0.0.1]) by mail101-db3 (MessageSwitch) id 1326739886705944_4143; Mon, 16 Jan 2012 18:51:26 +0000 (UTC) Received: from DB3EHSMHS010.bigfish.com (unknown [10.3.81.250]) by mail101-db3.bigfish.com (Postfix) with ESMTP id A6CAF200056; Mon, 16 Jan 2012 18:51:26 +0000 (UTC) Received: from mail.nimblestorage.com (64.62.153.98) by DB3EHSMHS010.bigfish.com (10.3.87.110) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 16 Jan 2012 18:51:22 +0000 Received: from [10.11.1.75] (64.71.12.98) by coloex01.nimblestorage.com (192.168.50.95) with Microsoft SMTP Server (TLS) id 14.1.355.2; Mon, 16 Jan 2012 10:51:23 -0800 Message-ID: <4F1471AB.9060008@nimblestorage.com> Date: Mon, 16 Jan 2012 10:51:23 -0800 From: Manoj Govindassamy User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: , Subject: PG synchronous replication and unresponsive slave References: <4F0E0438.5070300@nimblestorage.com> <4F0F229F.30308@nimblestorage.com> In-Reply-To: <4F0F229F.30308@nimblestorage.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.71.12.98] X-OriginatorOrg: nimblestorage.com X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201201/57 X-Sequence-Number: 38969 anyone with PG Synchronous Replication knowledge, please help me with your views on the below questions. thanks, Manoj On 01/12/2012 10:12 AM, Manoj Govindassamy wrote: > > any help on this is much appreciated. > > thanks, > Manoj > > > On 01/11/2012 01:50 PM, Manoj Govindassamy wrote: >> Hi, >> >> I have a PG 9.1.2 Master <--> Slave with synchronous replication >> setup. They are all working fine as expected. I do have a case where >> I want to flip Master to non replication mode whenever its slave is >> not responding. I have set replication_timeout to 5s and whenever >> salve is not responding for for more than 5s, i see the master >> detecting it. But, the transactions on the master is stuck till the >> slave comes back. To get over it, I reloaded the config on master >> with synchronous_commit = local. Further transactions on the master >> are going thru fine with this local commits turned on. >> >> Here are my questions: >> >> 1. Transaction which was stuck right when slave going away never went >> thru even after I reloaded master's config with local commit on. I do >> see all new transactions on master are going thru fine, except the >> one which was stuck initially. How to get this stuck transaction >> complete or return with error. >> >> 2. Whenever there is a problem with slave, I have to manually reload >> master's config with local commit turned on to get master go forward. >> Is there any automated way to reload this config with local commit on >> on slave's unresponsiveness ? tcp connection timeouts, replication >> timeouts all detect the failures, but i want to run some corrective >> action on these failure detection. >> > >