PG-320: Removal of state columnns from pgsm view.

We are concerned with finished queries in pg_stat_monitor, so state and
state_code columns were removed from the pg_stat_monitor_view as we only
list finished queries on it.

Removed state regression as it is not necessary anymore.

Also, this allowed us to remove the call to pgss_store on ExecutorStart,
which just updated query state to EXEC, thus saving some CPU.
This commit is contained in:
Diego Fronza
2022-01-05 16:32:02 -03:00
parent eaa9c08e24
commit 8a94129848
21 changed files with 177 additions and 306 deletions

View File

@@ -1,8 +0,0 @@
CREATE EXTENSION pg_stat_monitor;
SELECT pg_stat_monitor_reset();
SELECT 1;
SELECT 1/0; -- divide by zero
SELECT query, state_code, state FROM pg_stat_monitor ORDER BY query COLLATE "C";
SELECT pg_stat_monitor_reset();
DROP EXTENSION pg_stat_monitor;