Subject: [PATCH 1/9] rewrite infinite loop in our style

From: Álvaro Herrera <[email-masked]>
Date: Wed, 11 Mar 2026 15:36:14 +0100

---
 src/backend/commands/cluster.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 8b5571374d0..da4919e497a 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -4062,8 +4062,14 @@ repack_worker_internal(dsm_segment *seg)
 	 */
 	InvalidateCatalogSnapshot();
 
-	while (!decode_concurrent_changes(decoding_ctx, shared))
-		;
+	for (;;)
+	{
+		bool	stop = decode_concurrent_changes(decoding_ctx, shared);
+
+		if (stop)
+			break;
+
+	}
 
 	/* Cleanup. */
 	cleanup_logical_decoding(decoding_ctx);
-- 
2.47.3

--pnppmxqkefjd4hu2
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment;
	filename*0="0002-rename-setup_logical_decoding-to-repack_setup_logica.noc";
	filename*1="fbot.txt"