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
This commit is contained in:
parent
afd12774ae
commit
dcd4454590
|
@ -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 = (
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);";
|
||||
|
|
|
@ -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);";
|
||||
|
|
|
@ -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);";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue