Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coS4T-00031C-P5 for pgsql-admin@arkaria.postgresql.org; Thu, 16 Mar 2017 09:51:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1coS4T-0004EX-71 for pgsql-admin@arkaria.postgresql.org; Thu, 16 Mar 2017 09:51:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1coS4S-00044P-FJ for pgsql-admin@postgresql.org; Thu, 16 Mar 2017 09:51:48 +0000 Received: from lb3-smtp-cloud2.xs4all.net ([194.109.24.29]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1coS4L-0006Sn-4v for pgsql-admin@postgresql.org; Thu, 16 Mar 2017 09:51:47 +0000 Received: from webmail.xs4all.nl ([194.109.20.203]) by smtp-cloud2.xs4all.net with ESMTP id wZrc1u00R4NtgTm01ZrcPL; Thu, 16 Mar 2017 10:51:37 +0100 Received: from mail.genj.nl ([77.242.116.162]) by webmail.xs4all.nl with HTTP (HTTP/1.1 POST); Thu, 16 Mar 2017 10:51:37 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 16 Mar 2017 10:51:37 +0100 From: vinny To: Anushka Weerakkodyge Cc: pgsql-admin@postgresql.org, pgsql-admin-owner@postgresql.org Subject: Re: How to Identify and Fail Transaction When Slave Node Down In-Reply-To: References: Message-ID: <3e84a1a05b8af81d76953df6eb2bf8fd@xs4all.nl> X-Sender: vinny@xs4all.nl User-Agent: XS4ALL Webmail X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On 2017-03-16 10:06, Anushka Weerakkodyge wrote: > Hi, > > problem still persists. > Is there any configuration (parameter?) to set the timeout of the > connection ? Because if the slave node is down, transaction to master > node waits forever until slave node comes back online. > Any suggestion would be highly appreciated. > > Thanks, > Anushka > On Thu, Mar 16, 2017 at 5:21 AM, Anushka Weerakkodyge > wrote: > >> Hi all, >> >> I have a synchronous streaming replication environment which is >> implemented using inbuilt replication mechanism in postgresql. >> Replication is working fine except I need to fail the data >> modification transactions when the slave node is not accessible. >> >> Is it possible? >> >> Please let me know whether there is a way to identify slave node >> status and fail the transaction using any inbuilt mechanism or some >> other technique. >> >> Thanks, >> Anushka As far as I know, which is does not mean much, there is no timeout setting. And that's by design; a timeout can occur because the node is down, but also because it's busy and cannot answer in time, or there is a network hickup. Adding a timeout would basically break the "syncronous" promise because that guarantees that either all nodes are updated, or the transaction fails. And yes I googled this from: https://www.postgresql.org/message-id/CADp-Sm7ENFJH4YQmJVYD2qB2OaKa6qb6TEHCJWfce%2BQoQXsdhA%40mail.gmail.com In the case of a node going down you should probably but some failover mechanism in place so you can safely remove the dead node from the setup and rebuild it before making it part of the cluster again. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin