Timeout Transactions on Synchronous Replication Standby Failures
От | Yunong Xiao |
---|---|
Тема | Timeout Transactions on Synchronous Replication Standby Failures |
Дата | |
Msg-id | B706A55A-E13C-421F-9F21-09B13254DFE5@gmail.com обсуждение исходный текст |
Список | 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 по дате отправления: