Re: pg_buffercache: Add per-relation summary stats - Mailing list pgsql-hackers

From Khoa Nguyen
Subject Re: pg_buffercache: Add per-relation summary stats
Date
Msg-id CAONt3B0VnKVaM=Ka-hm5+y=APGrnn=0985Ldp2wZLxLxzkaeQw@mail.gmail.com
Whole thread
In response to Re: pg_buffercache: Add per-relation summary stats  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Given that going beyond the reasonable work_mem is pathological and
rare, I can see why documenting it is a simpler and better choice.
Attached is v4 with memory uncapped with documentation.  I kept the
usagecount_total from v3.  Happy to keep iterating if there's more to
address.


On Thu, Jul 9, 2026 at 1:05 PM Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Thu, Jul 9, 2026 at 2:58 PM Khoa Nguyen <kdnguyen9.oss@gmail.com> wrote:
> > I think erroring out when the
> > estimated hash size exceeds work_mem is sufficient.  We can rely on
> > the DBA’s call to increase this session’s work_mem for this particular
> > query to go through without affecting all backends.
>
> I am -1 on an error in that case. I would just document how much
> memory the function can potentially use.
>
Given that going beyond the reasonable work_mem is pathological and
rare, I can see why documenting it is a simpler and better choice.
Attached is v4 with memory uncapped and documentation.  I kept the
usagecount_total from v3.  Let me know if anything else needs to be
addressed.

Thanks,
-Khoa

Attachment

pgsql-hackers by date:

Previous
From: "Tristan Partin"
Date:
Subject: Re: Grab bag of smaller OpenSSL fixups
Next
From: Masahiko Sawada
Date:
Subject: Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation