aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2021-09-30 10:01:03 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2021-09-30 10:01:03 -0300
commite3731bac52cf049bed965aa4f96cb073ed044b68 (patch)
tree7d2fbf04374184adde70882c6288599137dfebe8 /src/test
parent64a8687a68914aa3f5a0867885777a1294eceb1c (diff)
downloadpostgresql-e3731bac52cf049bed965aa4f96cb073ed044b68.tar.gz
postgresql-e3731bac52cf049bed965aa4f96cb073ed044b68.zip
Repair two portability oversights of new test
First, as pointed out by Tom Lane and Michael Paquier, I failed to realize that Windows' PostgresNode needs an extra pg_hba.conf line (added by PostgresNode->set_replication_conf, called internally by ->init() when 'allows_streaming=>1' is given -- but I purposefully omitted that). I think a good fix should be to have nodes with only 'has_archiving=>1' set up for replication too, but that's a bigger discussion. Fix it by calling ->set_replication_conf, which is not unprecedented, as pointed out by Andrew Dunstan. I also forgot to uncomment a ->finish() call for a pumpable IPC::Run file descriptor. Apparently this is innocuous in almost all platforms. Backpatch to 14. The older branches were added this file too, but not this particular part of the test. Discussion: https://postgr.es/m/3000074.1632947632@sss.pgh.pa.us Discussion: https://postgr.es/m/YVT7qwhR8JmC2kfz@paquier.xyz
Diffstat (limited to 'src/test')
-rw-r--r--src/test/recovery/t/026_overwrite_contrecord.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/recovery/t/026_overwrite_contrecord.pl b/src/test/recovery/t/026_overwrite_contrecord.pl
index a034215dac1..14211dd25d4 100644
--- a/src/test/recovery/t/026_overwrite_contrecord.pl
+++ b/src/test/recovery/t/026_overwrite_contrecord.pl
@@ -101,6 +101,7 @@ $node = PostgresNode->get_new_node('primary2');
$node->init(
has_archiving => 1,
extra => ['--wal-segsize=1']);
+$node->set_replication_conf;
# Note: consistent use of forward slashes here avoids any escaping problems
# that arise from use of backslashes. That means we need to double-quote all
@@ -181,7 +182,7 @@ $node->poll_query_until(
# Now crash the node with the transaction open
$node->stop('immediate');
-#$h->finish();
+$h->finish();
$node->start;
$node->safe_psql('postgres', 'create table witness (a int);');
$node->safe_psql('postgres', 'insert into witness values (42)');