Re: Wrong comment for ReplicationSlotCreate

From: Daniil Davydov <3danissimo(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Wrong comment for ReplicationSlotCreate
Date: 2026-01-05 10:30:47
Message-ID: CAJDiXggvewBRezW0B=h-4aNGGDPNgiJYhjpH7cqkRuhqD8VSEQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Jan 5, 2026 at 1:25 PM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Dear Amit,
>
> >
> > I think it is better if we add some comments atop
> > ReplicationSlotAlter() as you are suggesting. What do you think of the
> > attached?
>
> Thanks for attaching the patch. There is a small typo:
>
> > + * clinet-side. Enabling it at any random point during decoding has the
>
> "clinet" should be client. Others are OK for me.
>

Thank you all for your comments!
I agree with suggested fixes. Please, see them in the attached patch.

On Mon, Jan 5, 2026 at 2:56 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
> Hi Amit,
>
> While reviewing your change, I find the other typo in slot.c:
> ```
> - /* Check if the slot exits with the given name. */
> + /* Check if the slot exists with the given name. */
> s = SearchNamedReplicationSlot(name, false);
> if (s == NULL || !s->in_use)
> ```
>
> “Exits” and “exists” have totally different meanings, thus might lead to misunderstanding. Attached is a trivial diff to fix that.
>

Good catch!
I am not sure that we should put both fixes together, so I'll put your fix in a
separate patch.

--
Best regards,
Daniil Davydov

Attachment Content-Type Size
v2-0002-Improve-comments-for-ReplicationSlotAcquire.patch text/x-patch 793 bytes
v2-0001-Improve-comments-for-ReplicationSlotAlter.patch text/x-patch 2.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2026-01-05 10:31:27 Re: Adding REPACK [concurrently]
Previous Message shveta malik 2026-01-05 10:30:15 Re: [Patch] add new parameter to pg_replication_origin_session_setup