Timeout Transactions on Synchronous Replication Standby Failures - Mailing list pgsql-general

From Yunong Xiao
Subject Timeout Transactions on Synchronous Replication Standby Failures
Date
Msg-id B706A55A-E13C-421F-9F21-09B13254DFE5@gmail.com
Whole thread Raw
List pgsql-general
Hi,

I have a vanilla HA synchronous replication setup, consisting of 1 primary and 1 synchronous standby. When a standby
fails,it looks like transactions still get written to the primary, and there's no messaging back to the client to
indicatestandby failure. Rather the primary just never ends the connection to the client, leaving the client hanging. 

Ideally, I'd like the ability to add a timeout to the primary such that it will rollback the transaction if it's unable
tocommit to the standby, and include a mechanism to message this failure to the client. Otherwise, the client has no
guaranteesthat the data written will be durably persisted on two boxes and is essentially left in the dark on whether
thetransaction committed on a standby failure. 

I've looked through  literature in the Postgres docs and looked around in the Postgres source, and it looks as if this
isnot currently supported.  Are there plans to support something like this in future versions? Something like a
sync_replication_timeoutparameter I can set on the master such that the master will time out on the client and rollback
thetransaction in the face of standby failures. 

-Yunong

pgsql-general by date:

Previous
From: Marti Raudsepp
Date:
Subject: Re: 9.1 causing "out of shared memory" error and higher serialization conflicts
Next
From: "Randy Ficker"
Date:
Subject: Re: 9.1 causing "out of shared memory" error and higher serialization conflicts