On Thu, Aug 15, 2024 at 5:06 AM Imseih (AWS), Sami <samims...@gmail.com> wrote: > > > I think the testing discussion should be moved to a different thread. > > What do you think? > See v4. > > 0001 deals with reporting queryId in exec_execute_message and > exec_bind_message. > 0002 deals with reporting queryId after a cache invalidation. > > There are no tests as this requires more discussion in a separate thread(?) >
hi. v4-0001 work as expected. i don't know how to test 0002 In 0001 and 0002, all foreach loops, we can use the new macro foreach_node. see https://git.postgresql.org/cgit/postgresql.git/commit/?id=14dd0f27d7cd56ffae9ecdbe324965073d01a9ff the following are the minimum tests I come up with for 0001 /* 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