Fix excessive logging in idle slotsync worker.

Amit Kapila <akapila@postgresql.org>

Commit: 91741b7cb7b5e0f0eb5100a548798b5a395cd3b5
Author: Amit Kapila <akapila@postgresql.org>
Date: 2026-04-13T03:51:34Z
Releases: 17.10
Fix excessive logging in idle slotsync worker.

The slotsync worker was incorrectly identifying no-op states as successful
updates, triggering a busy loop to sync slots that logged messages every
200ms. This patch corrects the logic to properly classify these states,
enabling the worker to respect normal sleep intervals when no work is
performed.

Reported-by: Fujii Masao <masao.fujii@gmail.com>
Author: Zhijie Hou <houzj.fnst@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Backpatch-through: 17, where it was introduced
Discussion: https://postgr.es/m/CAHGQGwF6zG9Z8ws1yb3hY1VqV-WT7hR0qyXCn2HdbjvZQKufDw@mail.gmail.com

Files

PathChange+/−
src/backend/replication/logical/slotsync.c modified +15 −2

Discussion