From: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
---|---|
To: | Gurjeet Singh <gurjeet(at)singh(dot)im> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Typo in comment for pgstat_database_flush_cb() |
Date: | 2025-04-06 11:31:50 |
Message-ID: | CAPmGK174HVGqKC5K3+aeT66k0OZ8NpQ2YCKcAkbB1gXGqTU0Cw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Mar 30, 2025 at 7:54 PM Gurjeet Singh <gurjeet(at)singh(dot)im> wrote:
> On Sun Mar 30, 2025 at 4:39 AM PDT, Heikki Linnakangas wrote:
> > On 30/03/2025 14:32, Heikki Linnakangas wrote:
> >> On 30/03/2025 13:28, Etsuro Fujita wrote:
> >>> Another thing I noticed is $SUBJECT: I think “if lock could not
> >>> immediately acquired” should be “if lock could not be immediately
> >>> acquired”. Attached is a patch for that.
> >>
> >> Yep. And there are more instances of the same typo in other such
> >> flush_cb functions, if you search for "immediately acquired".
>
> +1 for chainging other occurrences of this in other pgstat_*.c files.
>
> > While we're at it, the comment feels a bit awkward to me anyway. Maybe
> > rephrase it to "If nowait is true and the lock could not be immediately
> > acquired, returns false without flushing the entry. Otherwise returns true."
>
> This rephrasing does sounds better.
+1 for both suggestions. So I modified the comment as such in each
file with such a flush_cb function. I will push the patch.
Thanks Heikki for the suggestions! Thanks Gurjeet and Tender for the review!
Best regards,
Etsuro Fujita
Attachment | Content-Type | Size |
---|---|---|
modify-comments-for-pgstat-flush-cb-functions.patch | application/octet-stream | 2.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2025-04-06 11:35:23 | Re: Thinko in pgstat_build_snapshot() |
Previous Message | jian he | 2025-04-06 11:29:46 | Re: Make COPY format extendable: Extract COPY TO format implementations |