[PATCH] standby: Clarify recovery conflict comment

Поиск
Список
Период
Сортировка
Искать

[PATCH] standby: Clarify recovery conflict comment

От:
Ankush 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



Re: [PATCH] standby: Clarify recovery conflict comment

От:
Andreas Karlsson <andreas@proxel.se>
Дата:
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



FAQ