Re: Add support for entry counting in pgstats
От | Michael Paquier |
---|---|
Тема | Re: Add support for entry counting in pgstats |
Дата | |
Msg-id | aNnPlJQt-dgFYX-W@paquier.xyz обсуждение исходный текст |
Ответ на | Re: Add support for entry counting in pgstats (Sami Imseih <samimseih@gmail.com>) |
Список | pgsql-hackers |
On Fri, Sep 26, 2025 at 12:09:45PM -0500, Sami Imseih wrote: > Thanks for v3. The only remaining comment I have is: Thanks for the extra lookup. I have fixed this one, incorporated the feedback from Chao, and applied the result after more tests with pgbench to check the state of the counter. With more concurrency and an instance set up like that in postgresql.conf: shared_preload_libraries = 'injection_points' injection_points.stats = on And of course that: psql -c 'create extension injection_points' Then with the following flow, checking that the count never gets higher than the number of clients: 1) pgbench -n -T 300 -f create_inj.sql -c 10 $ cat create_inj.sql \set id random(1,100000) select injection_points_attach('popo:id', 'notice'); select injection_points_run('popo:id'); select injection_points_detach('popo:id'); 2) pgbench -n -T 300 -f select_inj.sql -c 10 $ cat select_inj.sql \set id random(1,100000) select injection_points_stats_numcalls('popo:id'); 3) psql session: select injection_points_stats_count(); \watch 1 And I have found, cough, a rather embarrassing bug on the way, unrelated to the proposal of this thread. It's in the module injection_points for its fixed stats, so nothing ground-breaking, still embarrassing. Will post a fix on a new thread shortly.. -- Michael
Вложения
В списке pgsql-hackers по дате отправления: