Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/test/cluster_tap/t/004_backend_types.pl
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,21 @@
q{SELECT count(*) FROM pg_stat_activity
WHERE backend_type IN (
'heartbeat', 'interconnect listener',
'lms worker',
'managed recovery process', 'recovery coordinator',
'recovery worker', 'sinval broadcaster', 'tt gc')});
is($pgrac_visible, '0',
'no pgrac process descriptor visible except spawned skeletons (others deferred to Stage 2-6)');

# spec-7.3 D2: the LMS DATA-plane worker pool ships with a default of
# cluster.lms_workers = 2 -- worker 0 stays the historic 'lms' process and
# workers 1..N-1 run as 'lms worker' aux processes, so exactly ONE
# 'lms worker' descriptor is a spawned skeleton now (not deferred).
my $lms_worker_visible = $node->safe_psql(
'postgres',
q{SELECT count(*) FROM pg_stat_activity WHERE backend_type = 'lms worker'});
is($lms_worker_visible, '1',
'default LMS pool spawns exactly one lms worker aux process (spec-7.3 D2)');

# LMON is spawned by postmaster (spec-1.11 Sprint A). Verify it
# appears in pg_stat_activity exactly once.
my $lmon_visible = $node->safe_psql(
Expand Down
6 changes: 6 additions & 0 deletions src/test/cluster_tap/t/078_ic_tier1_partial_send_recv.pl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ sub build_hello
$node->append_conf('postgresql.conf', "cluster.enabled = on\n");
$node->append_conf('postgresql.conf', "cluster.interconnect_tier = tier1\n");
$node->append_conf('postgresql.conf', "cluster.node_id = 0\n");
# spec-7.3 merge: this hand-rolled rig reserves ONE data port per node; the
# shipped default cluster.lms_workers=2 binds [data_port, data_port+1] and
# cross-wires consecutive free ports (HELLO DATA worker mismatch). Pin the
# pool to one worker: N=1 is the spec-7.2 topology identity this rig was
# written against.
$node->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");
$node->append_conf('postgresql.conf', "cluster.allow_single_node = on\n");

# Declare 2 nodes so we can spoof "peer 1" connecting to "peer 0" (us).
Expand Down
7 changes: 7 additions & 0 deletions src/test/cluster_tap/t/288_cf_enqueue_concurrent.pl
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ sub cf_counter
$node0->append_conf('postgresql.conf', "cluster.node_id = 0\n");
$node1->append_conf('postgresql.conf', $common_conf);
$node1->append_conf('postgresql.conf', "cluster.node_id = 1\n");
# spec-7.3 merge: this hand-rolled rig reserves ONE data port per node; the
# shipped default cluster.lms_workers=2 binds [data_port, data_port+1] and
# cross-wires consecutive free ports (HELLO DATA worker mismatch). Pin the
# pool to one worker: N=1 is the spec-7.2 topology identity this rig was
# written against.
$node0->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");
$node1->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");

my $pgrac_conf = <<EOC;
[cluster]
Expand Down
7 changes: 7 additions & 0 deletions src/test/cluster_tap/t/289_cf_bootstrap.pl
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@
$node0->append_conf('postgresql.conf', "cluster.node_id = 0\n");
$node1->append_conf('postgresql.conf', $common_conf);
$node1->append_conf('postgresql.conf', "cluster.node_id = 1\n");
# spec-7.3 merge: this hand-rolled rig reserves ONE data port per node; the
# shipped default cluster.lms_workers=2 binds [data_port, data_port+1] and
# cross-wires consecutive free ports (HELLO DATA worker mismatch). Pin the
# pool to one worker: N=1 is the spec-7.2 topology identity this rig was
# written against.
$node0->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");
$node1->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");

my $pgrac_conf = <<EOC;
[cluster]
Expand Down
3 changes: 3 additions & 0 deletions src/test/cluster_tap/t/334_ic_rdma_soft_roce.pl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ sub command_exists
for my $node ($pair->node0, $pair->node1)
{
$node->adjust_conf('postgresql.conf', 'cluster.interconnect_tier', 'tier3');
# spec-7.3 merge: this rig rewrites pgrac.conf with ONE data port per
# node; pin the pool to one worker (N=1 = spec-7.2 topology identity).
$node->adjust_conf('postgresql.conf', 'cluster.lms_workers', '1');
}

sub write_rdma_pgrac_conf
Expand Down
9 changes: 9 additions & 0 deletions src/test/cluster_tap/t/335_adg_two_thread_rfs_apply.pl
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,15 @@ sub wait_for_log_match_from
'cluster.adg_rfs_conninfos = ' . quote_conf($rfs_conninfos) . "\n");
$standby1->append_conf('postgresql.conf', $standby_common_conf);
$standby1->append_conf('postgresql.conf', "cluster.node_id = 1\n");
# spec-7.3 merge: this hand-rolled rig reserves ONE data port per node; the
# shipped default cluster.lms_workers=2 binds [data_port, data_port+1] and
# cross-wires consecutive free ports (HELLO DATA worker mismatch). Pin the
# pool to one worker: N=1 is the spec-7.2 topology identity this rig was
# written against.
$primary0->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");
$primary1->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");
$standby0->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");
$standby1->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");
write_pair_conf($standby0, $standby1, 'adg2_standby');

$standby0->start;
Expand Down
5 changes: 5 additions & 0 deletions src/test/cluster_tap/t/336_cluster_backup_pitr.pl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
$node->append_conf('postgresql.conf',
"cluster.enabled = on\n"
. "cluster.node_id = 0\n"
. "cluster.lms_workers = 1\n"
. "cluster.allow_single_node = on\n"
. "wal_level = replica\n"
. "archive_mode = on\n"
Expand Down Expand Up @@ -466,6 +467,7 @@ sub configure_pair_restore
. "restore_command = 'cp $pair_archive/%f %p'\n"
. "cluster.enabled = on\n"
. "cluster.node_id = 0\n"
. "cluster.lms_workers = 1\n"
. "cluster.allow_single_node = on\n"
. "cluster.voting_disks = ''\n"
. "cluster.wal_threads_dir = ''\n"
Expand Down Expand Up @@ -605,6 +607,7 @@ sub wait_for_pair_restore_promotion
$bad_target_node->append_conf('postgresql.conf',
"cluster.enabled = on\n"
. "cluster.node_id = 0\n"
. "cluster.lms_workers = 1\n"
. "cluster.allow_single_node = on\n"
. "wal_level = replica\n"
. "cluster.recovery_target_scn = '0'\n");
Expand All @@ -624,6 +627,7 @@ sub wait_for_pair_restore_promotion
$multi_target_node->append_conf('postgresql.conf',
"cluster.enabled = on\n"
. "cluster.node_id = 0\n"
. "cluster.lms_workers = 1\n"
. "cluster.allow_single_node = on\n"
. "wal_level = replica\n"
. "cluster.recovery_target_scn = '1'\n"
Expand All @@ -645,6 +649,7 @@ sub wait_for_pair_restore_promotion
$pin_node->append_conf('postgresql.conf',
"cluster.enabled = on\n"
. "cluster.node_id = 0\n"
. "cluster.lms_workers = 1\n"
. "cluster.allow_single_node = on\n"
. "wal_level = replica\n"
. "archive_mode = on\n"
Expand Down
7 changes: 7 additions & 0 deletions src/test/cluster_tap/t/337_shared_catalog_ddl_2node.pl
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@
$node1->append_conf('postgresql.conf', $sc_common);
$node1->append_conf('postgresql.conf', $cluster_conf);
$node1->append_conf('postgresql.conf', "cluster.node_id = 1\n");
# spec-7.3 merge: this hand-rolled rig reserves ONE data port per node; the
# shipped default cluster.lms_workers=2 binds [data_port, data_port+1] and
# cross-wires consecutive free ports (HELLO DATA worker mismatch). Pin the
# pool to one worker: N=1 is the spec-7.2 topology identity this rig was
# written against.
$node0->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");
$node1->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");

my $pgrac_conf = <<EOC;
[cluster]
Expand Down
7 changes: 7 additions & 0 deletions src/test/cluster_tap/t/339_shared_catalog_faults_2node.pl
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,13 @@
$node1->append_conf('postgresql.conf', $sc_common);
$node1->append_conf('postgresql.conf', $cluster_conf);
$node1->append_conf('postgresql.conf', "cluster.node_id = 1\n");
# spec-7.3 merge: this hand-rolled rig reserves ONE data port per node; the
# shipped default cluster.lms_workers=2 binds [data_port, data_port+1] and
# cross-wires consecutive free ports (HELLO DATA worker mismatch). Pin the
# pool to one worker: N=1 is the spec-7.2 topology identity this rig was
# written against.
$node0->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");
$node1->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");

my $pgrac_conf = <<EOC;
[cluster]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@
$node1->append_conf('postgresql.conf', $sc_common);
$node1->append_conf('postgresql.conf', $cluster_conf);
$node1->append_conf('postgresql.conf', "cluster.node_id = 1\n");
# spec-7.3 merge: this hand-rolled rig reserves ONE data port per node; the
# shipped default cluster.lms_workers=2 binds [data_port, data_port+1] and
# cross-wires consecutive free ports (HELLO DATA worker mismatch). Pin the
# pool to one worker: N=1 is the spec-7.2 topology identity this rig was
# written against.
$node0->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");
$node1->append_conf('postgresql.conf', "cluster.lms_workers = 1\n");

my $pgrac_conf = <<EOC;
[cluster]
Expand Down
Loading