Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org, alex work <alexwork033@gmail.com>, Robert Haas <robertmhaas@gmail.com>
Date: 2024-03-25T14:47:43Z
Lists: pgsql-hackers, pgsql-general
On Fri, Mar 22, 2024 at 04:41:49PM -0400, Tom Lane wrote:
> Nathan Bossart <nathandbossart@gmail.com> writes:
>> LGTM
> 
> Thanks for looking, I'll push that shortly.

Are there any changes you'd like to see for the Bloom patch [0]?  I'd like
to see about getting that committed for v17.  One thing that crossed my
mind is creating a combined list/filter that transparently created a filter
when necessary (for reuse elsewhere), but I'm not sure that's v17 material.

[0] https://postgr.es/m/attachment/158079/bloom_v2.patch

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



Commits

  1. Optimize roles_is_member_of() with a Bloom filter.

  2. Use a hash table for catcache.c's CatCList objects.