pgbench=# select query_id from pg_stat_activity where pid=7008;
3370541688642856312
pgbench=# \watch 0.2
-7505942672311739493
-7505942672311739493
NULL
-7505942672311739493
-7505942672311739493
NULL
NULL
-7810315603562552972
NULL
-7810315603562552972
NULL
4477171674326430251
-8406700390779190035
-7810315603562552972
....
NULL display the query_id
Thanks for reporting , I was able to reproduce this locally and my immediate observation is as we "pgstat_report_query_id(0, true);" in exec_simple_query which resets the st_query_id to 0 and we use the same in pg_stat_get_activity which is used to return the query_id in the pg_stat_activity view because of this the query_id is set to NULL in pg_stat_activity view , i might be totally wrong here ,please correct me if i am wrong.
From:
PG Bug reporting form Date: Subject:
BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.