Re: further improving roles_is_member_of() - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: further improving roles_is_member_of()
Date
Msg-id 20240412191928.GA2519977@nathanxps13
Whole thread Raw
In response to [MASSMAIL]further improving roles_is_member_of()  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
On Thu, Apr 11, 2024 at 11:16:33PM -0500, Nathan Bossart wrote:
> As shown in the attached work-in-progress patch, this actually ends up
> removing more code than it adds, and it seems to provide similar results to
> HEAD (using the benchmark from the previous thread [0]).  I intend to test
> it with many more roles to see if it's better in more extreme cases.

Even with 100K roles, the Bloom filter added in commit d365ae7 seems to do
a pretty good job at keeping up with the hash table approach.  The callers
of roles_is_member_of() that do list_member_oid() on the returned list
might benefit a little from a hash table, but I'm skeptical it makes much
difference in practice.  This was an interesting test, but I'll likely
withdraw this patch shortly.

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



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: allow changing autovacuum_max_workers without restarting
Next
From: Andres Freund
Date:
Subject: Re: Issue with the PRNG used by Postgres