Refactor more the regression tests of pg_stat_statements
Michael Paquier <michael@paquier.xyz>
Refactor more the regression tests of pg_stat_statements This commit expands more the refactoring of the regression tests of pg_stat_statements, with tests moved out of pg_stat_statements.sql into separate files. The following file structure is now used: - select is mostly the former pg_stat_statements.sql, renamed. - dml for INSERT/UPDATE/DELETE and MERGE - user_activity, to test role-level checks and stat resets. - wal, to check the WAL generation after some queries. Like e8dbdb1, there is no change in terms of code coverage or results, and this finishes the split I was aiming for in these tests. Most of the tests used "test" of "pgss_test" as names for the tables used, these are renamed to less generic names. Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/Y/7Y9U/y/keAW3qH@paquier.xyz
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_stat_statements/expected/dml.out | added | +147 −0 |
| contrib/pg_stat_statements/expected/pg_stat_statements.out | deleted | +0 −768 |
| contrib/pg_stat_statements/expected/select.out | added | +414 −0 |
| contrib/pg_stat_statements/expected/user_activity.out | added | +199 −0 |
| contrib/pg_stat_statements/expected/wal.out | added | +33 −0 |
| contrib/pg_stat_statements/Makefile | modified | +2 −2 |
| contrib/pg_stat_statements/meson.build | modified | +4 −1 |
| contrib/pg_stat_statements/sql/dml.sql | added | +76 −0 |
| contrib/pg_stat_statements/sql/pg_stat_statements.sql | deleted | +0 −300 |
| contrib/pg_stat_statements/sql/select.sql | added | +149 −0 |
| contrib/pg_stat_statements/sql/user_activity.sql | added | +65 −0 |
| contrib/pg_stat_statements/sql/wal.sql | added | +20 −0 |
Discussion
- Normalization of utility queries in pg_stat_statements 15 messages · 2023-02-08 → 2023-08-17