Re: Sample rate added to pg_stat_statements

Поиск
Список
Период
Сортировка
От Ilia Evdokimov
Тема Re: Sample rate added to pg_stat_statements
Дата
Msg-id fdcdad79-7258-410d-b0c4-f488087dca7d@tantorlabs.com
обсуждение исходный текст
Ответ на Re: Sample rate added to pg_stat_statements  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
Список pgsql-hackers
On 09.01.2025 22:13, Alena Rybakina wrote:
> Hi! Thank you for the work with this subject.
>
> I looked at your patch and noticed that this part of the code is 
> repeated several times:
>
> if (nesting_level == 0)
>     {
>         if (!IsParallelWorker())
>             current_query_sampled = 
> pg_prng_double(&pg_global_prng_state) < pgss_sample_rate;
>         else
>             current_query_sampled = false;
>
>     }
>
> I think you should put this in a function like 
> update_current_query_sampled. I've attached a diff file with the changes.
>

Agree, thanks.


--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.




В списке pgsql-hackers по дате отправления: