Improve cleanup phases in regression tests of pg_stat_statements
Michael Paquier <michael@paquier.xyz>
Improve cleanup phases in regression tests of pg_stat_statements As shaped, two DROP ROLE queries included in "user_activity" were showing in the reports for "wal". The intention is to keep each test isolated and independent, so this is incorrect. This commit adds some calls to pg_stat_statements_reset() to clean up the statistics once each test finishes, so as there are no risks of overlap in the reports for individial scenarios. The addition in "user_activity" fixes the output of "wal". The new resets done in "level_tracking" and "utility" are added for consistency with the rest, though they do not affect the stats generated in the other tests. Oversight in d0028e3. Reported-by: Andrei Zubkov Discussion: https://postgr.es/m/7beb722dd016bf54f1c78bfd6d44a684e28da624.camel@moonset.ru
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_stat_statements/expected/level_tracking.out | modified | +6 −0 |
| contrib/pg_stat_statements/expected/user_activity.out | modified | +6 −0 |
| contrib/pg_stat_statements/expected/utility.out | modified | +6 −0 |
| contrib/pg_stat_statements/expected/wal.out | modified | +8 −11 |
| contrib/pg_stat_statements/sql/level_tracking.sql | modified | +1 −0 |
| contrib/pg_stat_statements/sql/user_activity.sql | modified | +1 −0 |
| contrib/pg_stat_statements/sql/utility.sql | modified | +1 −0 |
Discussion
- Normalization of utility queries in pg_stat_statements 15 messages · 2023-02-08 → 2023-08-17