| From: | David Geier <geidav(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Ayoub Kazar <kazarayoub2004(at)gmail(dot)com> |
| Cc: | KAZAR Ayoub <ma_kazar(at)esi(dot)dz>, Tomas Vondra <tomas(at)vondra(dot)me>, Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Add pg_stat_vfdcache view for VFD cache statistics |
| Date: | 2026-09-01 07:21:34 |
| Message-ID: | 52677fc8-f57d-48c2-9415-6beb3ea6fa01@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 13.07.2026 00:44, Ayoub Kazar wrote:
> I chose to keep an accurate running count of the memory footprint per
> backend by tracking both the sizeof(Vfd) and the exact filename string
> lengths.
>
> We add the string length to the total footprint when a file is opened, and
> subtract it when the VFD is freed (i suppose this is not "Too much" of a
> work done, although it's done in a bit hot place); v5 of the patch is
> attached.
Better use GetMemoryChunkSpace() instead of using strlen() + 1, to get
the true allocation size.
--
David Geier
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-09-01 07:35:43 | Re: SUM(int2)/SUM(int4) do not detect overflow of the int8 accumulator |
| Previous Message | David Rowley | 2026-09-01 07:18:17 | Re: Reducing relcache memory usage: deduping index shapes |