Re: Disallow cancellation of waiting for synchronous replication

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Marco Slot <marco(at)citusdata(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, dim(at)tapoueh(dot)org
Subject: Re: Disallow cancellation of waiting for synchronous replication
Date: 2019-12-21 02:39:22
Message-ID: 20191221023922.GD15758@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-12-21 02:44:25 Re: MarkBufferDirtyHint() and LSN update
Previous Message Michael Paquier 2019-12-21 02:29:33 Re: Hooks for session start and end, take two