RE: Resetting synchronous_standby_names can wait for CHECKPOINT to finish

From: "Yusuke Egashira (Fujitsu)" <egashira(dot)yusuke(at)fujitsu(dot)com>
To: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Resetting synchronous_standby_names can wait for CHECKPOINT to finish
Date: 2024-05-14 00:12:42
Message-ID: TY3PR01MB9966D2C6A3D6EADC496EB833FFE32@TY3PR01MB9966.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

> When the checkpointer process is busy, even if we reset synchronous_standby_names, the resumption of the backend processes waiting in SyncRep are made to wait until the checkpoint is completed.
> This prevents the prompt resumption of application processing when a problem occurs on the standby server in a synchronous replication system.
> I confirmed this in PostgreSQL 12.18.

I have tested this issue on Postgres built from the master branch (17devel) and observed the same behavior where the backend SyncRep release is blocked until CHECKPOINT completion.

In situations where a synchronous standby instance encounters an error and needs to be detached, I believe that the current behavior of waiting for SyncRep is inappropriate as it delays the backend.
I don't think changing the position of SIGHUP processing in the Checkpointer process carries much risk. Is there any oversight in my perception?

Regards,
Yusuke Egashira.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2024-05-14 00:13:11 Re: I have an exporting need...
Previous Message Jacob Champion 2024-05-14 00:05:41 Re: Direct SSL connection with ALPN and HBA rules