From: Michael Paquier Date: Fri, 20 Oct 2023 01:09:27 +0000 (+0900) Subject: Remove unnecessary dependencies to wal_level=logical in TAP tests X-Git-Tag: REL_17_BETA1~1647 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=dcd4454590e77dc90c28ce4b4a4b62369bbc03e2;p=postgresql.git Remove unnecessary dependencies to wal_level=logical in TAP tests A couple of TAP tests make use of wal_level=logical for nodes that do not need to do any kind of logical decoding operations, like subscription nodes on which changes are only applied. This can be confusing when reading these tests as setup examples, so let's remove this configuration where not required (contrary to two-way logical replication and similar more complex cases). This simplifies the tests a bit, making them slightly cheaper with less WAL generated overall. Author: Hayato Kuroda Discussion: https://postgr.es/m/TYAPR01MB5866946BCEB747ABE513ACC6F5D5A@TYAPR01MB5866.jpnprd01.prod.outlook.com --- diff --git a/src/test/recovery/t/035_standby_logical_decoding.pl b/src/test/recovery/t/035_standby_logical_decoding.pl index 480e6d6caa5..9c34c0d36cb 100644 --- a/src/test/recovery/t/035_standby_logical_decoding.pl +++ b/src/test/recovery/t/035_standby_logical_decoding.pl @@ -293,7 +293,7 @@ $node_primary->wait_for_replay_catchup($node_standby); ####################### # Initialize subscriber node ####################### -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; my %psql_subscriber = ( diff --git a/src/test/recovery/t/038_save_logical_slots_shutdown.pl b/src/test/recovery/t/038_save_logical_slots_shutdown.pl index de198295607..52ec4e88200 100644 --- a/src/test/recovery/t/038_save_logical_slots_shutdown.pl +++ b/src/test/recovery/t/038_save_logical_slots_shutdown.pl @@ -53,7 +53,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('sub'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create tables diff --git a/src/test/subscription/t/001_rep_changes.pl b/src/test/subscription/t/001_rep_changes.pl index 0a399cdb82b..87d44f634f5 100644 --- a/src/test/subscription/t/001_rep_changes.pl +++ b/src/test/subscription/t/001_rep_changes.pl @@ -15,7 +15,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create some preexisting content on publisher diff --git a/src/test/subscription/t/002_types.pl b/src/test/subscription/t/002_types.pl index 6b5853b80b6..40155ad5633 100644 --- a/src/test/subscription/t/002_types.pl +++ b/src/test/subscription/t/002_types.pl @@ -16,7 +16,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create some preexisting content on publisher diff --git a/src/test/subscription/t/003_constraints.pl b/src/test/subscription/t/003_constraints.pl index 6e902360cc6..6e3591d486b 100644 --- a/src/test/subscription/t/003_constraints.pl +++ b/src/test/subscription/t/003_constraints.pl @@ -15,7 +15,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Setup structure on publisher diff --git a/src/test/subscription/t/004_sync.pl b/src/test/subscription/t/004_sync.pl index ee07d28b372..11269708aa2 100644 --- a/src/test/subscription/t/004_sync.pl +++ b/src/test/subscription/t/004_sync.pl @@ -15,7 +15,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->append_conf('postgresql.conf', "wal_retrieve_retry_interval = 1ms"); $node_subscriber->start; diff --git a/src/test/subscription/t/005_encoding.pl b/src/test/subscription/t/005_encoding.pl index 2f0bf7730b9..c9cece48c45 100644 --- a/src/test/subscription/t/005_encoding.pl +++ b/src/test/subscription/t/005_encoding.pl @@ -15,9 +15,7 @@ $node_publisher->init( $node_publisher->start; my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init( - allows_streaming => 'logical', - extra => [ '--locale=C', '--encoding=LATIN1' ]); +$node_subscriber->init(extra => [ '--locale=C', '--encoding=LATIN1' ]); $node_subscriber->start; my $ddl = "CREATE TABLE test1 (a int, b text);"; diff --git a/src/test/subscription/t/006_rewrite.pl b/src/test/subscription/t/006_rewrite.pl index 8bc7e872d9b..62a1bdcd152 100644 --- a/src/test/subscription/t/006_rewrite.pl +++ b/src/test/subscription/t/006_rewrite.pl @@ -13,7 +13,7 @@ $node_publisher->init(allows_streaming => 'logical'); $node_publisher->start; my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; my $ddl = "CREATE TABLE test1 (a int, b text);"; diff --git a/src/test/subscription/t/007_ddl.pl b/src/test/subscription/t/007_ddl.pl index cbdb5b66e46..02e9dd61d53 100644 --- a/src/test/subscription/t/007_ddl.pl +++ b/src/test/subscription/t/007_ddl.pl @@ -13,7 +13,7 @@ $node_publisher->init(allows_streaming => 'logical'); $node_publisher->start; my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; my $ddl = "CREATE TABLE test1 (a int, b text);"; diff --git a/src/test/subscription/t/008_diff_schema.pl b/src/test/subscription/t/008_diff_schema.pl index c6e41b65b9f..ed676b73e56 100644 --- a/src/test/subscription/t/008_diff_schema.pl +++ b/src/test/subscription/t/008_diff_schema.pl @@ -15,7 +15,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create some preexisting content on publisher diff --git a/src/test/subscription/t/009_matviews.pl b/src/test/subscription/t/009_matviews.pl index 38080b43132..798aad53c73 100644 --- a/src/test/subscription/t/009_matviews.pl +++ b/src/test/subscription/t/009_matviews.pl @@ -13,7 +13,7 @@ $node_publisher->init(allows_streaming => 'logical'); $node_publisher->start; my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; diff --git a/src/test/subscription/t/010_truncate.pl b/src/test/subscription/t/010_truncate.pl index a5b64453924..9eeb518b528 100644 --- a/src/test/subscription/t/010_truncate.pl +++ b/src/test/subscription/t/010_truncate.pl @@ -15,7 +15,7 @@ $node_publisher->init(allows_streaming => 'logical'); $node_publisher->start; my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->append_conf('postgresql.conf', qq(max_logical_replication_workers = 6)); $node_subscriber->start; diff --git a/src/test/subscription/t/011_generated.pl b/src/test/subscription/t/011_generated.pl index 7711be295a0..4f8518cf351 100644 --- a/src/test/subscription/t/011_generated.pl +++ b/src/test/subscription/t/011_generated.pl @@ -15,7 +15,7 @@ $node_publisher->init(allows_streaming => 'logical'); $node_publisher->start; my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; diff --git a/src/test/subscription/t/012_collation.pl b/src/test/subscription/t/012_collation.pl index 823550a31b5..dd66424be8c 100644 --- a/src/test/subscription/t/012_collation.pl +++ b/src/test/subscription/t/012_collation.pl @@ -21,9 +21,7 @@ $node_publisher->init( $node_publisher->start; my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init( - allows_streaming => 'logical', - extra => [ '--locale=C', '--encoding=UTF8' ]); +$node_subscriber->init(extra => [ '--locale=C', '--encoding=UTF8' ]); $node_subscriber->start; my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; diff --git a/src/test/subscription/t/013_partition.pl b/src/test/subscription/t/013_partition.pl index 275fb3b5257..0f1a34235d0 100644 --- a/src/test/subscription/t/013_partition.pl +++ b/src/test/subscription/t/013_partition.pl @@ -15,11 +15,11 @@ $node_publisher->init(allows_streaming => 'logical'); $node_publisher->start; my $node_subscriber1 = PostgreSQL::Test::Cluster->new('subscriber1'); -$node_subscriber1->init(allows_streaming => 'logical'); +$node_subscriber1->init; $node_subscriber1->start; my $node_subscriber2 = PostgreSQL::Test::Cluster->new('subscriber2'); -$node_subscriber2->init(allows_streaming => 'logical'); +$node_subscriber2->init; $node_subscriber2->start; my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; diff --git a/src/test/subscription/t/014_binary.pl b/src/test/subscription/t/014_binary.pl index e5ce849c191..6abc899bd96 100644 --- a/src/test/subscription/t/014_binary.pl +++ b/src/test/subscription/t/014_binary.pl @@ -16,7 +16,7 @@ $node_publisher->start; # Create and initialize subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create tables on both sides of the replication diff --git a/src/test/subscription/t/015_stream.pl b/src/test/subscription/t/015_stream.pl index 603d00f9e78..986e879968c 100644 --- a/src/test/subscription/t/015_stream.pl +++ b/src/test/subscription/t/015_stream.pl @@ -131,7 +131,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create some preexisting content on publisher diff --git a/src/test/subscription/t/016_stream_subxact.pl b/src/test/subscription/t/016_stream_subxact.pl index 9a2f06f2720..561855cb42c 100644 --- a/src/test/subscription/t/016_stream_subxact.pl +++ b/src/test/subscription/t/016_stream_subxact.pl @@ -84,7 +84,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create some preexisting content on publisher diff --git a/src/test/subscription/t/017_stream_ddl.pl b/src/test/subscription/t/017_stream_ddl.pl index d00ede44ed1..2fd4ede4027 100644 --- a/src/test/subscription/t/017_stream_ddl.pl +++ b/src/test/subscription/t/017_stream_ddl.pl @@ -20,7 +20,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create some preexisting content on publisher diff --git a/src/test/subscription/t/018_stream_subxact_abort.pl b/src/test/subscription/t/018_stream_subxact_abort.pl index 201138882c3..e115216e755 100644 --- a/src/test/subscription/t/018_stream_subxact_abort.pl +++ b/src/test/subscription/t/018_stream_subxact_abort.pl @@ -135,7 +135,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create some preexisting content on publisher diff --git a/src/test/subscription/t/019_stream_subxact_ddl_abort.pl b/src/test/subscription/t/019_stream_subxact_ddl_abort.pl index 1ad7ace84a0..cd26eee05a2 100644 --- a/src/test/subscription/t/019_stream_subxact_ddl_abort.pl +++ b/src/test/subscription/t/019_stream_subxact_ddl_abort.pl @@ -21,7 +21,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create some preexisting content on publisher diff --git a/src/test/subscription/t/020_messages.pl b/src/test/subscription/t/020_messages.pl index 826d39cd89a..6f31fe4d6f7 100644 --- a/src/test/subscription/t/020_messages.pl +++ b/src/test/subscription/t/020_messages.pl @@ -16,7 +16,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create some preexisting content on publisher diff --git a/src/test/subscription/t/021_twophase.pl b/src/test/subscription/t/021_twophase.pl index 8ce4cfc983c..9bcf46c7b35 100644 --- a/src/test/subscription/t/021_twophase.pl +++ b/src/test/subscription/t/021_twophase.pl @@ -21,7 +21,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->append_conf('postgresql.conf', qq(max_prepared_transactions = 10)); $node_subscriber->start; diff --git a/src/test/subscription/t/022_twophase_cascade.pl b/src/test/subscription/t/022_twophase_cascade.pl index b37ed95c9e2..75b1a62a743 100644 --- a/src/test/subscription/t/022_twophase_cascade.pl +++ b/src/test/subscription/t/022_twophase_cascade.pl @@ -39,7 +39,7 @@ logical_decoding_work_mem = 64kB $node_B->start; # node_C my $node_C = PostgreSQL::Test::Cluster->new('node_C'); -$node_C->init(allows_streaming => 'logical'); +$node_C->init; $node_C->append_conf( 'postgresql.conf', qq( max_prepared_transactions = 10 diff --git a/src/test/subscription/t/023_twophase_stream.pl b/src/test/subscription/t/023_twophase_stream.pl index be9f2aab282..22948e64248 100644 --- a/src/test/subscription/t/023_twophase_stream.pl +++ b/src/test/subscription/t/023_twophase_stream.pl @@ -307,7 +307,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->append_conf( 'postgresql.conf', qq( max_prepared_transactions = 10 diff --git a/src/test/subscription/t/024_add_drop_pub.pl b/src/test/subscription/t/024_add_drop_pub.pl index 8614b1b5b34..cdb14a919a8 100644 --- a/src/test/subscription/t/024_add_drop_pub.pl +++ b/src/test/subscription/t/024_add_drop_pub.pl @@ -15,7 +15,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Create table on publisher diff --git a/src/test/subscription/t/025_rep_changes_for_schema.pl b/src/test/subscription/t/025_rep_changes_for_schema.pl index 8543f52710c..97405cd8d55 100644 --- a/src/test/subscription/t/025_rep_changes_for_schema.pl +++ b/src/test/subscription/t/025_rep_changes_for_schema.pl @@ -15,7 +15,7 @@ $node_publisher->start; # Create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; # Test replication with publications created using FOR TABLES IN SCHEMA diff --git a/src/test/subscription/t/026_stats.pl b/src/test/subscription/t/026_stats.pl index a033588008f..f31b25b4afa 100644 --- a/src/test/subscription/t/026_stats.pl +++ b/src/test/subscription/t/026_stats.pl @@ -15,7 +15,7 @@ $node_publisher->start; # Create subscriber node. my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; diff --git a/src/test/subscription/t/028_row_filter.pl b/src/test/subscription/t/028_row_filter.pl index aec483f785f..1510149f97b 100644 --- a/src/test/subscription/t/028_row_filter.pl +++ b/src/test/subscription/t/028_row_filter.pl @@ -14,7 +14,7 @@ $node_publisher->start; # create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; diff --git a/src/test/subscription/t/031_column_list.pl b/src/test/subscription/t/031_column_list.pl index dbff8060402..7bf83e01f46 100644 --- a/src/test/subscription/t/031_column_list.pl +++ b/src/test/subscription/t/031_column_list.pl @@ -14,7 +14,7 @@ $node_publisher->start; # create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->append_conf('postgresql.conf', qq(max_logical_replication_workers = 6)); $node_subscriber->start; diff --git a/src/test/subscription/t/032_subscribe_use_index.pl b/src/test/subscription/t/032_subscribe_use_index.pl index 880ef2d57a6..d1f65d05e5e 100644 --- a/src/test/subscription/t/032_subscribe_use_index.pl +++ b/src/test/subscription/t/032_subscribe_use_index.pl @@ -14,7 +14,7 @@ $node_publisher->start; # create subscriber node my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; diff --git a/src/test/subscription/t/100_bugs.pl b/src/test/subscription/t/100_bugs.pl index 4fabc441683..7e5221afff7 100644 --- a/src/test/subscription/t/100_bugs.pl +++ b/src/test/subscription/t/100_bugs.pl @@ -24,7 +24,7 @@ $node_publisher->init(allows_streaming => 'logical'); $node_publisher->start; my $node_subscriber = PostgreSQL::Test::Cluster->new('subscriber'); -$node_subscriber->init(allows_streaming => 'logical'); +$node_subscriber->init; $node_subscriber->start; my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; @@ -175,7 +175,7 @@ $node_pub_sub->init(allows_streaming => 'logical'); $node_pub_sub->start; my $node_sub = PostgreSQL::Test::Cluster->new('testsubscriber1'); -$node_sub->init(allows_streaming => 'logical'); +$node_sub->init; $node_sub->start; # Create the tables in all nodes.