Re: Synchronous commit behavior during network outage - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Synchronous commit behavior during network outage
Date
Msg-id 3bb1eaa490dee98d85439ea70a094696f3b8d534.camel@j-davis.com
Whole thread Raw
In response to Re: Synchronous commit behavior during network outage  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: Synchronous commit behavior during network outage  (Andrey Borodin <x4mmm@yandex-team.ru>)
List pgsql-hackers
On Wed, 2021-06-30 at 17:28 +0500, Andrey Borodin wrote:
> > My patch also covers the backend termination case. Is there a
> > reason
> > you left that case out?
> 
> Yes, backend termination is used by HA tool before rewinding the
> node.

Can't you just disable sync rep first (using ALTER SYSTEM SET
synchronous_standby_names=''), which will unstick the backend, and then
terminate it?

If you don't handle the termination case, then there's still a chance
for the transaction to become visible to other clients before its
replicated.

> There is one more caveat we need to fix: we should prevent instant
> recovery from happening.

That can already be done with the restart_after_crash GUC.

Regards,
    Jeff Davis





pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Replication protocol doc fix
Next
From: Michael Paquier
Date:
Subject: Re: wrong relkind error messages