Re: further improving roles_is_member_of()

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: further improving roles_is_member_of()
Дата
Msg-id 20240412191928.GA2519977@nathanxps13
обсуждение исходный текст
Ответ на [MASSMAIL]further improving roles_is_member_of()  (Nathan Bossart <nathandbossart@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: allow changing autovacuum_max_workers without restarting
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Issue with the PRNG used by Postgres