pg_stat_statements: Rework test order
authorMichael Paquier <michael@paquier.xyz>
Tue, 20 Jan 2026 22:47:38 +0000 (07:47 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 20 Jan 2026 22:47:38 +0000 (07:47 +0900)
The test "squashing" was the last item of the REGRESS list, but
"cleanup" should be the second to last, dropping the extension.
"oldextversions" is the last item.

In passing, the REGRESS list is cleaned up to include one item per line,
so as diffs are minimized when adding new test files.

Noticed while playing with this area of the code.

Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Man Zeng <zengman@halodbtech.com>
Discussion: https://postgr.es/m/aW6_Xc8auuu5iAPi@paquier.xyz

contrib/pg_stat_statements/Makefile
contrib/pg_stat_statements/expected/squashing.out
contrib/pg_stat_statements/meson.build
contrib/pg_stat_statements/sql/squashing.sql

index fe0478ac55266f4ed11d2649fc75a2874219e2bb..f947eb7ae6caf9aed2c1e5479c53a0fb9c25bd8e 100644 (file)
@@ -19,9 +19,25 @@ PGFILEDESC = "pg_stat_statements - execution statistics of SQL statements"
 LDFLAGS_SL += $(filter -lm, $(LIBS))
 
 REGRESS_OPTS = --temp-config $(top_srcdir)/contrib/pg_stat_statements/pg_stat_statements.conf
-REGRESS = select dml cursors utility level_tracking planning \
-   user_activity wal entry_timestamp privileges extended \
-   parallel plancache cleanup oldextversions squashing
+
+# Note: Test "cleanup" is kept second to last, removing the extension.
+REGRESS = \
+   select \
+   dml \
+   cursors \
+   utility \
+   level_tracking \
+   planning \
+   user_activity \
+   wal entry_timestamp \
+   privileges \
+   extended \
+   parallel \
+   plancache \
+   squashing \
+   cleanup \
+   oldextversions
+
 # Disabled because these tests require "shared_preload_libraries=pg_stat_statements",
 # which typical installcheck users do not have (e.g. buildfarm clients).
 NO_INSTALLCHECK = 1
index 6963a434db975c9b42ad4a0261556cf4611d2261..8438235a2ce0e8dd29c2fb03f8efdfa10fc96dc8 100644 (file)
@@ -1,7 +1,6 @@
 --
 -- Const squashing functionality
 --
-CREATE EXTENSION pg_stat_statements;
 --
 -- Simple Lists
 --
index 079a8eb5afcf22a0ba4802a3a76be0f2c05e3e68..9d78cb88b7d7818a00c377c92ec107355d6d021d 100644 (file)
@@ -37,6 +37,7 @@ install_data(
   kwargs: contrib_data_args,
 )
 
+# Note: Test "cleanup" is kept second to last, removing the extension.
 tests += {
   'name': 'pg_stat_statements',
   'sd': meson.current_source_dir(),
@@ -56,9 +57,9 @@ tests += {
       'extended',
       'parallel',
       'plancache',
+      'squashing',
       'cleanup',
       'oldextversions',
-      'squashing',
     ],
     'regress_args': ['--temp-config', files('pg_stat_statements.conf')],
     # Disabled because these tests require
index 2100f2d83fd0bd860354ff32e6a3d0e99a2c1f28..fc9e65738738902338199890e5eb90bb0a60f1c3 100644 (file)
@@ -1,7 +1,6 @@
 --
 -- Const squashing functionality
 --
-CREATE EXTENSION pg_stat_statements;
 
 --
 -- Simple Lists