pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs
Date: Tue, 26 Mar 2024 14:49:25 -0500
Message-ID: <20240326194925.GB3701353@nathanxps13> (raw)
In-Reply-To: <3088176.1711480080@sss.pgh.pa.us>
References: <20240322165448.GA2350322@nathanxps13>
	<20240322193506.GA2352051@nathanxps13>
	<1084642.1711140109@sss.pgh.pa.us>
	<20240325144743.GA2618709@nathanxps13>
	<2490242.1711379319@sss.pgh.pa.us>
	<20240325151647.GA2662364@nathanxps13>
	<20240326165918.GA3350222@nathanxps13>
	<2999167.1711476963@sss.pgh.pa.us>
	<20240326184819.GA3559028@nathanxps13>
	<3088176.1711480080@sss.pgh.pa.us>

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





view thread (30+ messages)

Message-ID: <20240326194925.GB3701353@nathanxps13>
Permalink:  ../20240326194925.GB3701353@nathanxps13/
Also on:    postgresql.org/message-id/20240326194925.GB3701353@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: nathandbossart@gmail.com, tgl@sss.pgh.pa.us, alexwork033@gmail.com, robertmhaas@gmail.com
  Subject: Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs
  In-Reply-To: <20240326194925.GB3701353@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox