At Fri, 29 Jul 2022 21:16:51 +0200, Tomas Vondra <tomas.vondra@enterprisedb.com> wrote in
> I don't think this can make meaningful difference - as you mention, we
> only really use this to decide when to spill to disk etc. So maybe
> you'll spill a bit sooner, but the work_mem is pretty crude threshold
> anyway, people don't tune it to an exact byte value (which would be
> pretty futile anyway).
From another perspective.. SlabStats includes the header size into
its total size. So it reports a different total size from
MemoryContextMemAllocated() (For example, 594 bytes vs 0). Since this
is an inconsistency within slab.c, no users will notice that
difference in the field.
> OTOH it does seem like an oversight, or at least an inconsistency with
> the two other contexts, so if anyone feels like tweaking it ...
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center