diff --git a/src/bin/scripts/t/090_reindexdb.pl b/src/bin/scripts/t/090_reindexdb.pl
index 159b637230..8b06218d6b 100644
--- a/src/bin/scripts/t/090_reindexdb.pl
+++ b/src/bin/scripts/t/090_reindexdb.pl
@@ -174,6 +174,7 @@ $node->command_fails(
 $node->command_fails(
 	[ 'reindexdb', '-j', '2', '-i', 'i1', 'postgres' ],
 	'parallel reindexdb cannot process indexes');
+# XXX The first query maps with a test above.
 $node->issues_sql_like(
 	[ 'reindexdb', '-j', '2', 'postgres' ],
 	qr/statement:\ REINDEX SYSTEM postgres;
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index e26b2b3f30..9daa438ccc 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -2195,7 +2195,8 @@ Run a command on the node, then verify that $expected_sql appears in the
 server log file.
 
 Reads the whole log file so be careful when working with large log outputs.
-The log file is truncated prior to running the command, however.
+The log file is truncated prior to running the command, and on Windows, a
+rotation of the log file is done before restarting the node.
 
 =cut
 
@@ -2207,7 +2208,18 @@ sub issues_sql_like
 
 	local %ENV = $self->_get_env();
 
-	truncate $self->logfile, 0;
+	# On Windows, the truncation would not work, so rotate the log
+	# file before restarting the server afresh.
+	if ($TestLib::windows_os)
+	{
+		$self->rotate_logfile;
+		$self->restart;
+	}
+	else
+	{
+		truncate $self->logfile, 0;
+	}
+
 	my $result = TestLib::run_log($cmd);
 	ok($result, "@$cmd exit code 0");
 	my $log = TestLib::slurp_file($self->logfile);
