On Sat, Aug 31, 2024 at 09:47:41AM +0800, jian he wrote:
> /* test \bind queryid exists */
> select query_id is not null as query_id_exist
> from pg_stat_activity where pid = pg_backend_pid() \bind \g
> 
> /* test that \parse \bind_named queryid exists */
> select pg_backend_pid() as current_pid \gset pref01_
> select query_id is not null as query_id_exist from pg_stat_activity
> where pid = $1 \parse stmt11
> \bind_named stmt11 :pref01_current_pid \g

I need to spend a bit more time with my head down for this thread, but
couldn't we use these commands with various query patterns in
pg_stat_statements and look at the shmem counters reported through its
view?
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to