[PATCH] standby: Clarify recovery conflict comment

Started by Ankush Mondal9 days ago2 messageshackers
Jump to latest
#1Ankush Mondal
ankushmondal1y2t@gmail.com

---
src/backend/storage/ipc/standby.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c
index 7f011e04990..b603f02167b 100644
--- a/src/backend/storage/ipc/standby.c
+++ b/src/backend/storage/ipc/standby.c
@@ -803,7 +803,8 @@ ResolveRecoveryConflictWithBufferPin(void)
 	if (GetCurrentTimestamp() >= ltime && ltime != 0)
 	{
 		/*
-		 * We're already behind, so clear a path as quickly as possible.
+		 * The standby delay has expired, so signal conflicting backends
+		 * to release their buffer pins as quickly as possible.
 		 */
 		SendRecoveryConflictWithBufferPin(RECOVERY_CONFLICT_BUFFERPIN);
 	}
-- 
2.43.0
#2Andreas Karlsson
andreas.karlsson@percona.com
In reply to: Ankush Mondal (#1)
Re: [PATCH] standby: Clarify recovery conflict comment

On 11/13/26 09:19, Ankush Mondal wrote:

if (GetCurrentTimestamp() >= ltime && ltime != 0)
{
/*
-		 * We're already behind, so clear a path as quickly as possible.
+		 * The standby delay has expired, so signal conflicting backends
+		 * to release their buffer pins as quickly as possible.
*/
SendRecoveryConflictWithBufferPin(RECOVERY_CONFLICT_BUFFERPIN);
}

Hi,

Thanks for the patch but I do not think the new version is better. The
old version explained intent while the new comment just re-explains what
the code does. Maybe some mix of the two comments would be better but I
doubt it is worth the churn.

--
Andreas Karlsson
Percona