Re: Disallow cancellation of waiting for synchronous replication - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Disallow cancellation of waiting for synchronous replication
Date
Msg-id 20191221023922.GD15758@paquier.xyz
Whole thread Raw
In response to Re: Disallow cancellation of waiting for synchronous replication  (Andrey Borodin <x4mmm@yandex-team.ru>)
List pgsql-hackers
On Fri, Dec 20, 2019 at 03:07:26PM +0500, Andrey Borodin wrote:
>> Sending a cancellation is currently the only way to resume after
>> disabling synchronous replication. Some HA solutions (e.g.
>> pg_auto_failover) rely on this behaviour. Would it be worth checking
>> whether synchronous replication is still required?
>
> I think changing synchronous_standby_names to some available
> standbys will resume all backends waiting for synchronous
> replication.  Do we need to check necessity of synchronous
> replication in any other case?

Yeah, I am not on board with the concept of this thread.  Depending
on your HA configuration you can also reset synchronous_standby_names
after a certain small-ish threshold has been reached in WAL to get at
the same result by disabling synchronous replication, though your
cluster cannot perform safely a failover so you need to keep track of
that state.  Something which would be useful is to improve some cases
where you still want to use synchronous replication by switching to a
different standby.  I recall that sometimes that can be rather slow..
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Hooks for session start and end, take two
Next
From: Michael Paquier
Date:
Subject: Re: MarkBufferDirtyHint() and LSN update