cybertec-postgresql/pg_show_plans

performances: getpid() vs MyProcPid

legrandlegrand opened this issue · 1 comments

Hello,
playing with
do $$ declare i int;j int; begin for i in 1..1000000 loop select 1 into j; end loop; end; $$;
and pg_show_plans_enable()

perf tool on my Ubuntu server is showing an high cpu activity arround _getpid.
Replacing getpid() with MyProcPid in pg_show_plans seems to help.

Maybe you will be able to reproduce.
regards
PAscal

I'll improve the next version. Thanks.