| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | 河田達也 <kawatatatsuya0913(at)gmail(dot)com> |
| Cc: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: [PATCH] Add memory usage reporting to VACUUM VERBOSE |
| Date: | 2025-11-24 21:28:54 |
| Message-ID: | CAD21AoDX+z5Bo5z7qdY4BFaEcQYJXoe+_2k6qMPX=pYfrxDunw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Nov 21, 2025 at 8:26 AM 河田達也 <kawatatatsuya0913(at)gmail(dot)com> wrote:
>
> Hi Sawada-san,
>
> Thank you for your additional feedback on v4!
>
> >We can initialize dead_items_max_bytes when declared.
> Thank you. I fixed it as you mentioned.
>
> >Does it need to check if vacrel->dead_items is non-NULL?
> Thank you. I fixed it as you mentioned.
>
> >I think we should not use "index scans" since the number doesn't
> >actually represent the number of index scans performed. How about
> >something like:
> >
> >memory usage: 1.02 MB in total, with dead-item storage reset 15 times
> >(limit was 0.06 MB)
> >
> >Also when it comes to the plural, we can use errmsg_plural() instead.
> Thank you. I fixed the message as you mentioned.
Thank you for updating the patch!
> Also, I found that ngettext() with appendStringInfo() is a standard pattern
> in the PostgreSQL codebase (e.g., src/backend/catalog/pg_shdepend.c,
> src/backend/catalog/dependency.c), so I use ngettext() in this code.
You're right. We should use ngettext() instead.
The patch basically looks good to me. I've made some cosmetic changes
to the v5 patch and attached it as a separate patch. Most of the
changes are to remove redundant comments (because it's obvious from
the codes) and rephrasing the comments. Please review it.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
| Attachment | Content-Type | Size |
|---|---|---|
| fix_masahiko.patch | application/octet-stream | 4.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Geoghegan | 2025-11-24 21:38:15 | Re: index prefetching |
| Previous Message | Nathan Bossart | 2025-11-24 21:25:51 | Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent |