Synchronous Replication Timeout - Mailing list pgsql-general

From Teresa Bradbury
Subject Synchronous Replication Timeout
Date
Msg-id 1702B692290AB24B9ADEA0259BE403E385914B@QLDC01
Whole thread Raw
Responses Re: Synchronous Replication Timeout
Re: Synchronous Replication Timeout
List pgsql-general

Hi,

 

I have a replication setup with a master and a single synchronous slave. If the slave dies (or the network goes down) I would like any transaction on the master that requires writing to fail so I can roll it back. At the moment, when I commit it just hangs forever or (if I cancel it using ^C in psql or using kill) it commits locally and not on the synchronous slave. Neither of these options are ok in my use case. I have tried setting statement_timeout but it does not work. So my questions are:

 

1) Is it possible to rollback transactions that fail to commit after a certain amount of time waiting for the slave?

 

2) If not, is there any intension of implementing such a feature in the near future?

 

3) Do any of the answers above change if we are dealing with two-phase commits instead? At the moment it hangs forever on ‘prepare transaction’, ‘commit prepared’ and ‘rollback prepared’ commands.

 

Thanks,

 

Tessa

 

 

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: PG94RC1- plv8 functions - problem with input parameter length
Next
From: Eric Svenson
Date:
Subject: Problem with pg_dump and decimal mark