Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs |
| Дата | |
| Msg-id | 642442.1711053105@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs
|
| Список | pgsql-hackers |
I wrote:
> ... I still see the problematic GRANT taking ~250ms, compared
> to 5ms in v15. roles_is_member_of is clearly on the hook for that.
Ah: looks like that is mainly the fault of the list_append_unique_oid
calls in roles_is_member_of. That's also an O(N^2) cost of course,
though with a much smaller constant factor.
I don't think we have any really cheap way to de-duplicate the role
OIDs, especially seeing that it has to be done on-the-fly within the
collection loop, and the order of roles_list is at least potentially
interesting. Not sure how to make further progress without a lot of
work.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера