From cf422aceabbd17043d14e530540b0950256c2de2 Mon Sep 17 00:00:00 2001
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Date: Thu, 5 Dec 2024 07:19:34 +0000
Subject: [PATCH v1] Improve comment around code that should not be reached in
 pgstat_write_statsfile()

Make it clear that this code should not be reached and that the branch is there
only because that would not be worth taking down the server.
---
 src/backend/utils/activity/pgstat.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
 100.0% src/backend/utils/activity/

diff --git a/src/backend/utils/activity/pgstat.c b/src/backend/utils/activity/pgstat.c
index 6f8d237826..39ade666a7 100644
--- a/src/backend/utils/activity/pgstat.c
+++ b/src/backend/utils/activity/pgstat.c
@@ -1655,7 +1655,10 @@ pgstat_write_statsfile(XLogRecPtr redo)
 
 		CHECK_FOR_INTERRUPTS();
 
-		/* we may have some "dropped" entries not yet removed, skip them */
+		/*
+		 * We may have some "dropped" entries not yet removed, skip them as
+		 * it's not worth taking down the server for this.
+		 */
 		Assert(!ps->dropped);
 		if (ps->dropped)
 			continue;
-- 
2.34.1

