Re: Fix inappropriate comments in function ReplicationSlotAcquire - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Fix inappropriate comments in function ReplicationSlotAcquire
Date
Msg-id CAA4eK1+KxE45DU+xO-1P2V7Nmi2JvSxMzmfTf22NFvHt8VOteg@mail.gmail.com
Whole thread Raw
In response to RE: Fix inappropriate comments in function ReplicationSlotAcquire  ("Wei Wang (Fujitsu)" <wangw.fnst@fujitsu.com>)
Responses RE: Fix inappropriate comments in function ReplicationSlotAcquire
List pgsql-hackers
On Thu, Jan 25, 2024 at 4:01 PM Wei Wang (Fujitsu)
<wangw.fnst@fujitsu.com> wrote:
>
>
> Yes, agree. I think these two parts have become slightly outdated after the
> commit 1632ea4. So also tried to fix the first part of the comment.
> Attach the new patch.
>

How about changing it to something simple like:
diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index f2781d0455..84c257a7aa 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -465,10 +465,7 @@ 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.
-        */
+        /* Check if the slot exits with the given name. */
        s = SearchNamedReplicationSlot(name, false);
        if (s == NULL || !s->in_use)
        {

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Przemysław Sztoch
Date:
Subject: Re: UUID v7
Next
From: Amit Kapila
Date:
Subject: Re: A failure in t/038_save_logical_slots_shutdown.pl