pgsql: Fix excessive logging in idle slotsync worker.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix excessive logging in idle slotsync worker.
Date: 2026-04-13 04:42:50
Message-ID: E1wC98L-000jtI-1a@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)fujii(at)gmail(dot)com>
Author: Zhijie Hou <houzj(dot)fnst(at)fujitsu(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Reviewed-by: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Backpatch-through: 17, where it was introduced
Discussion: https://postgr.es/m/CAHGQGwF6zG9Z8ws1yb3hY1VqV-WT7hR0qyXCn2HdbjvZQKufDw@mail.gmail.com

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/91741b7cb7b5e0f0eb5100a548798b5a395cd3b5

Modified Files
--------------
src/backend/replication/logical/slotsync.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2026-04-13 05:29:12 pgsql: Fix capitalization in publication describe output.
Previous Message David Rowley 2026-04-13 01:17:21 pgsql: Improve various new-to-v19 appendStringInfo calls