Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs
Date
Msg-id 20240326194925.GB3701353@nathanxps13
Whole thread Raw
In response to Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Mar 26, 2024 at 03:08:00PM -0400, Tom Lane wrote:
> My one remaining suggestion is that this comment isn't very precise
> about what's happening:
> 
>      * If there is a previously-created Bloom filter, use it to determine
>      * whether the role is missing from the list.  Otherwise, do an ordinary
>      * linear search through the existing role list.
> 
> Maybe more like
> 
>      * If there is a previously-created Bloom filter, use it to try to
>      * determine whether the role is missing from the list.  If it
>      * says yes, that's a hard fact and we can go ahead and add the
>      * role.  If it says no, that's only probabilistic and we'd better
>      * search the list.  Without a filter, we must always do an ordinary
>      * linear search through the existing list.
> 
> LGTM other than that nit.

Committed with that change.  Thanks for the guidance on this one.

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



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Schema variables - new implementation for Postgres 15
Next
From: Bharath Rupireddy
Date:
Subject: Re: New Table Access Methods for Multi and Single Inserts