pg_stat_monitor/regression/expected
Zsolt Parragi 5f8b716ef6 PG-2005: Do not keep unnecessary entries in the query stack
PGSM support nested query tracking, and it has to track the current SQL
call stack for this feature to work. But it incorrectly tracked all
previous queries executed within the current top level statement instead
o only the currently active queries.

This was easily visible for example with a FOR LOOP in a user function,
but could be also reproduced in many other ways.

There's also an issue that the related assertion, that compares the
length of the list with the max_stack_depth is incorrect. The stack
depth limits the size of the postgres stack for the C code, not the
number of nested SQL statements.

For now this commit leaves these assertions as-is, as while they are not
technically correct, these at least provide some kind of check on the
nesting depth. Maybe it would make sense to remove them in the future,
but for now, it could be a useful sanity check for testing the actual
fix - we shouldn't hit this assertion anymore with the changes in this
commit.

As for the actual fix, with the changes in this commit pgsm removes list
entries after we finished working on them. At that point we persisted
everything we needed already into the shared memory, and no longer need
the entries in the process local list. This is also true for the
duplicated query string, which if needed was already copied to the
shared memory.
2025-11-12 11:15:37 +01: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-1621: fix cmd_type mostly showing 0 values (#538) 2025-06-17 14:52:28 +01:00
cmd_type_1.out PG-1621: fix cmd_type mostly showing 0 values (#538) 2025-06-17 14:52:28 +01: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
decode_error_level.out PG-1313 Fix decode_error_level SQL function (#539) 2025-06-19 15:38:44 +02:00
decode_error_level_1.out PG-1313 Fix decode_error_level SQL function (#539) 2025-06-19 15:38:44 +02: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-1907 Add wal_buffers_full 2025-09-30 11:30:35 +02:00
functions_1.out PG-1907 Add wal_buffers_full 2025-09-30 11:30:35 +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
parallel.out PG-1907 Add columns to track parallel worker activity 2025-09-30 11:30:35 +02:00
parallel_1.out PG-1907 Add columns to track parallel worker activity 2025-09-30 11:30:35 +02:00
pgsm_query_id.out Revert "PG-156: replace query placeholders with actual arguments for… (#517) 2025-02-17 19:13:15 +02:00
pgsm_query_id_1.out Revert "PG-156: replace query placeholders with actual arguments for… (#517) 2025-02-17 19:13:15 +02:00
pgsm_query_id_2.out PG-1907 Add PG18 specific expected pgsm_query_id test outupt 2025-09-30 11:30:35 +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
squashing.out PG-1907 Support constant lists squashing in query jumbling 2025-09-30 11:30:35 +02:00
squashing_1.out PG-1907 Support constant lists squashing in query jumbling 2025-09-30 11:30:35 +02: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-2005: Do not keep unnecessary entries in the query stack 2025-11-12 11:15:37 +01:00
top_query_1.out PG-2005: Do not keep unnecessary entries in the query stack 2025-11-12 11:15:37 +01:00
user.out PG-588: Some queries are not being normalised. 2023-02-22 19:31:52 +05:00
version.out PG-1900 Remove compatibility with PG-12 2025-09-05 18:30:04 +02:00