postgres.git / summary / log / commit / refs
commit 9649f1adfdee66a843cf97e0b292c489ba05e2ec
Author: Amit Kapila <akapila@postgresql.org>
Date: Thu Jan 29 02:57:02 2026 +0000
First released in: 17.8, 18.2
Fix CI failure introduced in commit 851f6649cc.
The test added in commit 851f6649cc uses a backup taken from a node
created by the previous test to perform standby related checks. On
Windows, however, the standby failed to start with the following error:
FATAL: could not rename file "backup_label" to "backup_label.old": Permission denied
This occurred because some background sessions from the earlier test were
still active. These leftover processes continued accessing the parent
directory of the backup_label file, likely preventing the rename and
causing the failure. Ensuring that these sessions are cleanly terminated
resolves the issue in local testing.
Additionally, the has_restoring => 1 option has been removed, as it was
not required by the new test.
Reported-by: Robert Haas <robertmhaas@gmail.com>
Backpatch-through: 17
Discussion: https://postgr.es/m/CA+TgmobdVhO0ckZfsBZ0wqDO4qHVCwZZx8sf=EinafvUam-dsQ@mail.gmail.com
src/test/recovery/t/046_checkpoint_logical_slot.pl | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/test/recovery/t/046_checkpoint_logical_slot.pl b/src/test/recovery/t/046_checkpoint_logical_slot.pl
index 1cfb6a3734e..fbf484b5534 100644
--- a/src/test/recovery/t/046_checkpoint_logical_slot.pl
+++ b/src/test/recovery/t/046_checkpoint_logical_slot.pl
@@ -141,6 +141,13 @@ eval {
};
is($@, '', "Logical slot still valid");
+# If we send \q with $<psql_session>->quit the command can be sent to the
+# session already closed. So \q is in initial script, here we only finish
+# IPC::Run
+$xacts->{run}->finish;
+$checkpoint->{run}->finish;
+$logical->{run}->finish;
+
# Verify that the synchronized slots won't be invalidated immediately after
# synchronization in the presence of a concurrent checkpoint.
my $primary = $node;
@@ -156,8 +163,7 @@ $primary->backup($backup_name);
my $standby = PostgreSQL::Test::Cluster->new('standby');
$standby->init_from_backup(
$primary, $backup_name,
- has_streaming => 1,
- has_restoring => 1);
+ has_streaming => 1);
my $connstr_1 = $primary->connstr;
$standby->append_conf(
[parent: 3243c0177efb]