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 <[email protected]> wrote:
>
> On Thu, Jul 9, 2026 at 2:58 PM Khoa Nguyen <[email protected]> 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: v4-0001-pg_buffercache-Add-pg_buffercache_relations-funct.patch
Description: Binary data

Reply via email to