Re: Unused parameter in ProcessSlotSyncInterrupts()

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: cca5507 <cca5507@qq.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-29T15:04:13Z
Lists: pgsql-hackers
On Fri, Aug 29, 2025 at 10:40:25PM +0800, cca5507 wrote:
> When reading the code about slot sync, I find the $subject, attach a
> patch to fix it.

LGTM.  I looked through the original thread [0] for clues about the origins
of this parameter, but it's a very long thread, and ctrl+f didn't help.  It
seems to have become unused somewhere between v82 and v88 of the patch set,
though.  In v82, ProcessSlotSyncInterrupts() has the following code:

+	if (ShutdownRequestPending)
+	{
+		if (wrconn)
+			walrcv_disconnect(wrconn);
+		ereport(LOG,
+				errmsg("replication slot sync worker is shutting down on receiving SIGINT"));
+		proc_exit(0);
+	}

[0] https://postgr.es/m/514f6f2f-6833-4539-39f1-96cd1e011f23%40enterprisedb.com

-- 
nathan



Commits

  1. Remove unused parameter from ProcessSlotSyncInterrupts().