Re: Fix incorrect buffer lock description in pg_visibility comment

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix incorrect buffer lock description in pg_visibility comment
Date: 2026-01-05 18:41:15
Message-ID: CAD21AoAYEBE70xjoJ8cydsQ2Xx6VLJeDnqyePVtqoB6WES9tUw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 29, 2025 at 10:33 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> Hi,
>
> On Tue, Dec 23, 2025 at 6:18 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
> >
> > Hi Hackers,
> >
> > While reviewing the patch [1], though I couldn’t raise a comment for it, I noticed a comment error in the file pg_visibility.c, where a buffer lock is held in shared mode but the code comment mentioned exclusive mode. I am filing a small patch to correct the comment.
> >
> > I only changed "exclusively" to "shared", the format changed was done by pgindent.
>
> Yeah, it seems like a typo since the first commit of pg_visiblity,
> e472ce9624e0. I think we can backpatch it to all supported versions.
>

I find that "shared locked" sounds unnatural to me. How about
rephrasing to "... we're holding the buffer locked in shared mode"?
I've attached the patch.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
0001-pg_visibility-Fix-incorrect-buffer-lock-description.patch application/octet-stream 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2026-01-05 18:47:01 Re: Newly created replication slot may be invalidated by checkpoint
Previous Message Jacob Champion 2026-01-05 18:37:45 Re: Make PGOAUTHCAFILE in libpq-oauth work out of debug mode