| From: | Sami Imseih <samimseih(at)gmail(dot)com> |
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Cc: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: pgstat: add pgstat_prep_pending() for entry ref pending setup |
| Date: | 2026-07-16 15:58:37 |
| Message-ID: | CAA5RZ0um+tnU9iFWeRun1BKSnKhihQpd=zD03+6O1TtMMGcwzQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Thu, Jul 16, 2026 at 01:04:38PM +0900, Kyotaro Horiguchi wrote:
> > One concern I have is the name of the new function.
> > pgstat_prep_pending() sounds a bit incomplete. Would a name such as
> > pgstat_prep_pending_for_entry_ref() be clearer?
>
> Hmm. pgstat_prep_pending_for_entry_ref() would work here for the
> name.
I think pgstat_prep_pending_from_entry_ref() is better that _for_.
> Regarding the new function's comment, perhaps it could be phrased
> similarly to that of pgstat_prep_pending_entry(), for example:
> > Prepare the given entry to receive pending stats, if not already done.
This simple comment is sufficient. fixed.
> Finally, pgstat_get_entry_ref() does not return NULL when create is
> true, but the new function itself does not enforce that assumption. It
> might be worth adding an Assert(entry_ref != NULL), in addition to the
> assertion on flush_pending_cb.
Done.
See the attached.
--
Sami Imseih
Amazon Web Services (AWS)
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-pgstat-add-pgstat_prep_pending_from_entry_ref-for.patch | application/octet-stream | 3.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jelte Fennema-Nio | 2026-07-16 16:08:13 | Re: PG20 Minimum Dependency Thread |
| Previous Message | Fujii Masao | 2026-07-16 15:55:54 | Re: Fix publisher-side sequence permission reporting |