Fix regression test failure when wal_level is set to minimal. master github/master
authorMasahiko Sawada <[email protected]>
Wed, 24 Dec 2025 18:48:27 +0000 (10:48 -0800)
committerMasahiko Sawada <[email protected]>
Wed, 24 Dec 2025 18:48:27 +0000 (10:48 -0800)
Commit 67c209 removed the WARNING for insufficient wal_level from the
expected output, but the WARNING may still appear on buildfarm members
that run with wal_level=minimal.

To avoid unstable test output depending on wal_level, this commit the
test to use ALTER PUBLICATION for verifying the same behavior,
ensuring the output remains consistent regardless of the wal_level
setting.

Per buildfarm member thorntail.

Author: Zhijie Hou <[email protected]>
Discussion: https://postgr.es/m/TY4PR01MB16907680E27BAB146C8EB1A4294B2A@TY4PR01MB16907.jpnprd01.prod.outlook.com

src/test/regress/expected/publication.out
src/test/regress/sql/publication.sql

index 7f81e61d7a75e04ab32f8e491a21f4fa7d63fa0a..7fb49aaf29b8236b875c0e3eb6707cfcdbd4d4d4 100644 (file)
@@ -286,9 +286,9 @@ SET client_min_messages = 'ERROR';
 CREATE PUBLICATION regress_pub_for_allsequences_alltables FOR ALL SEQUENCES, ALL TABLES;
 -- Specifying WITH clause in an ALL SEQUENCES publication will emit a NOTICE.
 SET client_min_messages = 'NOTICE';
-CREATE PUBLICATION regress_pub_for_allsequences_alltables_withclause FOR ALL SEQUENCES, ALL TABLES WITH (publish = 'insert');
+ALTER PUBLICATION regress_pub_for_allsequences_alltables SET (publish = 'insert');
 NOTICE:  publication parameters are not applicable to sequence synchronization and will be ignored for sequences
-CREATE PUBLICATION regress_pub_for_allsequences_withclause FOR ALL SEQUENCES WITH (publish_generated_columns = 'stored');
+ALTER PUBLICATION regress_pub_for_allsequences_alltables SET (publish_generated_columns = 'stored');
 NOTICE:  publication parameters are not applicable to sequence synchronization and will be ignored for sequences
 RESET client_min_messages;
 SELECT pubname, puballtables, puballsequences FROM pg_publication WHERE pubname = 'regress_pub_for_allsequences_alltables';
@@ -301,15 +301,13 @@ SELECT pubname, puballtables, puballsequences FROM pg_publication WHERE pubname
                                        Publication regress_pub_for_allsequences_alltables
           Owner           | All tables | All sequences | Inserts | Updates | Deletes | Truncates | Generated columns | Via root 
 --------------------------+------------+---------------+---------+---------+---------+-----------+-------------------+----------
- regress_publication_user | t          | t             | t       | t       | t       | t         | none              | f
+ regress_publication_user | t          | t             | t       | f       | f       | f         | stored            | f
 (1 row)
 
 DROP SEQUENCE regress_pub_seq0, pub_test.regress_pub_seq1;
 DROP PUBLICATION regress_pub_forallsequences1;
 DROP PUBLICATION regress_pub_forallsequences2;
 DROP PUBLICATION regress_pub_for_allsequences_alltables;
-DROP PUBLICATION regress_pub_for_allsequences_alltables_withclause;
-DROP PUBLICATION regress_pub_for_allsequences_withclause;
 -- fail - Specifying ALL TABLES more than once
 CREATE PUBLICATION regress_pub_for_allsequences_alltables FOR ALL SEQUENCES, ALL TABLES, ALL TABLES;
 ERROR:  invalid publication object list
index 00390aecd4768f4c6678da9a9c8e136237432256..85b00bd67c8addfe93082dbd8dbcdf9a1fb72d8e 100644 (file)
@@ -146,8 +146,8 @@ CREATE PUBLICATION regress_pub_for_allsequences_alltables FOR ALL SEQUENCES, ALL
 
 -- Specifying WITH clause in an ALL SEQUENCES publication will emit a NOTICE.
 SET client_min_messages = 'NOTICE';
-CREATE PUBLICATION regress_pub_for_allsequences_alltables_withclause FOR ALL SEQUENCES, ALL TABLES WITH (publish = 'insert');
-CREATE PUBLICATION regress_pub_for_allsequences_withclause FOR ALL SEQUENCES WITH (publish_generated_columns = 'stored');
+ALTER PUBLICATION regress_pub_for_allsequences_alltables SET (publish = 'insert');
+ALTER PUBLICATION regress_pub_for_allsequences_alltables SET (publish_generated_columns = 'stored');
 RESET client_min_messages;
 
 SELECT pubname, puballtables, puballsequences FROM pg_publication WHERE pubname = 'regress_pub_for_allsequences_alltables';
@@ -157,8 +157,6 @@ DROP SEQUENCE regress_pub_seq0, pub_test.regress_pub_seq1;
 DROP PUBLICATION regress_pub_forallsequences1;
 DROP PUBLICATION regress_pub_forallsequences2;
 DROP PUBLICATION regress_pub_for_allsequences_alltables;
-DROP PUBLICATION regress_pub_for_allsequences_alltables_withclause;
-DROP PUBLICATION regress_pub_for_allsequences_withclause;
 
 -- fail - Specifying ALL TABLES more than once
 CREATE PUBLICATION regress_pub_for_allsequences_alltables FOR ALL SEQUENCES, ALL TABLES, ALL TABLES;