pg_stat_monitor/regression/expected
Zsolt Parragi 130d6b5fce
PG-592: Treat queries with different parent queries as separate entries (#403)
* PG-592: Treat queries with different parent queries as separate entries

1. Previously pg_stat_monitor had a `topquery` and `topqueryid` field, but it was only a sample:
it showed one of the top queries executing the specific query.

With this change, the same entry executed by two different functions will result in two entries in the statistics table.

2. This also fixes a bug where the content of these field disappeared for every second query executed:
previously the update function changed topqueryid to `0` if it was non zero, and changed it to the proper id when it was 0.
This resulted in an alternating behavior, where for every second executed query the top query disappeared.

After these changes, the top query is always shown.

3. The previous implementation also leaked dsa memory used to store the parent queries. This is now also fixed.

* PG-502: Fixing review comments

* dsa_free changed to assert as it can never happen
* restructured the ifs to be cleaner
  Note: kept the two-level ifs, as that makes more sense with the assert
  Note: didn't convert nested_level checks to macro, as it is used differently at different parts of the code

* PG-502: Fixing review comments

* PG-592 Add regression test

* Make test compatible with PG12

* Remove redundant line

---------

Co-authored-by: Artem Gavrilov <artem.gavrilov@percona.com>
2024-08-06 23:43:48 +02:00
..
application_name.out [PG-644] Add option to disable application name tracking (#469) 2024-07-23 18:49:33 +02:00
application_name_unique.out PG-563: Update TAP testcases and output due to changes by DEV. 2022-12-27 18:14:32 +05:00
application_name_unique_1.out PG-563: Update TAP testcases and output due to changes by DEV. 2022-12-27 18:14:32 +05:00
basic.out PG-320: Removing the query state code from the view. 2022-11-15 16:31:37 +00:00
cmd_type.out PG-588: Some queries are not being normalised. 2023-02-22 19:31:52 +05:00
cmd_type_1.out PG-544: Regression cleanup. 2022-11-16 21:31:16 +00:00
counters.out PG-570: Fix counters test case. 2023-01-03 18:50:53 +05:00
database.out PG-588: Some queries are not being normalised. 2023-02-22 19:31:52 +05:00
different_parent_queries.out PG-592: Treat queries with different parent queries as separate entries (#403) 2024-08-06 23:43:48 +02:00
error.out PG-320: Removing the query state code from the view. 2022-11-15 16:31:37 +00:00
error_1.out PG-554: Remove redundant files and fix regression. (#319) 2022-11-23 02:20:43 +05:00
error_2.out PG-588: Some queries are not being normalised. 2023-02-22 19:31:52 +05:00
error_insert.out PG-563: Update TAP testcases and output due to changes by DEV. 2022-12-27 18:14:32 +05:00
error_insert_1.out PG-563: Update TAP testcases and output due to changes by DEV. 2022-12-27 18:14:32 +05:00
functions.out [PG-810] PG-17 Support (#463) 2024-07-18 14:59:57 +02:00
functions_1.out [PG-810] PG-17 Support (#463) 2024-07-18 14:59:57 +02:00
guc.out [PG-644] Add option to disable application name tracking (#469) 2024-07-23 18:49:33 +02:00
guc_1.out [PG-644] Add option to disable application name tracking (#469) 2024-07-23 18:49:33 +02:00
guc_2.out [PG-644] Add option to disable application name tracking (#469) 2024-07-23 18:49:33 +02:00
histogram.out PG-544: Regression cleanup. 2022-11-16 19:47:07 +00:00
histogram_1.out PG-544: Regression cleanup. 2022-11-16 19:47:07 +00:00
histogram_2.out PG-544: Regression cleanup. 2022-11-16 19:47:07 +00:00
level_tracking.out [PG-810] PG-17 Support (#463) 2024-07-18 14:59:57 +02:00
level_tracking_1.out [PG-810] PG-17 Support (#463) 2024-07-18 14:59:57 +02:00
level_tracking_2.out [PG-810] PG-17 Support (#463) 2024-07-18 14:59:57 +02:00
pgsm_query_id.out PG-606: New GUC required for enabling/disabling of pgsm_query_id calculation… (#383) 2023-02-23 19:08:09 +05:00
pgsm_query_id_1.out [PG-810] PG-17 Support (#463) 2024-07-18 14:59:57 +02:00
relations.out PG-563: Update TAP testcases and output due to changes by DEV. 2022-12-27 18:14:32 +05:00
relations_1.out PostgreSQL 16 support for PGSM 2023-09-12 12:45:58 +05:00
rows.out PG-588: Some queries are not being normalised. 2023-02-22 19:31:52 +05:00
tags.out PG-320: Removing the query state code from the view. 2022-11-15 16:31:37 +00:00
top_query.out PG-581: top_queryid expected output verification and change. 2023-01-18 13:05:00 +05:00
top_query_1.out PG-581: top_queryid expected output verification and change. 2023-01-18 13:05:00 +05:00
user.out PG-588: Some queries are not being normalised. 2023-02-22 19:31:52 +05:00
version.out [PG-810] PG-17 Support (#463) 2024-07-18 14:59:57 +02:00