From c5289dc5c3a3c2b620f8c5e2a0bb8214caa6b1b7 Mon Sep 17 00:00:00 2001
From: Wang Wei <wangw.fnst@fujitsu.com>
Date: Thu, 25 Jan 2024 17:04:41 +0900
Subject: [PATCH v2] Fix inappropriate comments in function
 ReplicationSlotAcquire

Remove the inappropriate description of return value in function
ReplicationSlotAcquire. We will only error out and will not return -1.
---
 src/backend/replication/slot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 02a14ec210..62c08bc1b5 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -466,8 +466,8 @@ retry:
 	LWLockAcquire(ReplicationSlotControlLock, LW_SHARED);
 
 	/*
-	 * Search for the slot with the specified name if the slot to acquire is
-	 * not given. If the slot is not found, we either return -1 or error out.
+	 * Search for the slot with the specified name. Error out if the slot is
+	 * not found.
 	 */
 	s = SearchNamedReplicationSlot(name, false);
 	if (s == NULL || !s->in_use)
-- 
2.39.1.windows.1

