Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3a98f98

Browse files
author
Amit Kapila
committed
Fix CI failure introduced in commit 851f664.
The test added in commit 851f664 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 <[email protected]> Backpatch-through: 17 Discussion: https://postgr.es/m/CA+TgmobdVhO0ckZfsBZ0wqDO4qHVCwZZx8sf=EinafvUam-dsQ@mail.gmail.com
1 parent efbebb4 commit 3a98f98

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/test/recovery/t/046_checkpoint_logical_slot.pl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@
138138
};
139139
is($@, '', "Logical slot still valid");
140140

141+
# If we send \q with $<psql_session>->quit the command can be sent to the
142+
# session already closed. So \q is in initial script, here we only finish
143+
# IPC::Run
144+
$xacts->{run}->finish;
145+
$checkpoint->{run}->finish;
146+
$logical->{run}->finish;
147+
141148
# Verify that the synchronized slots won't be invalidated immediately after
142149
# synchronization in the presence of a concurrent checkpoint.
143150
my $primary = $node;
@@ -153,8 +160,7 @@
153160
my $standby = PostgreSQL::Test::Cluster->new('standby');
154161
$standby->init_from_backup(
155162
$primary, $backup_name,
156-
has_streaming => 1,
157-
has_restoring => 1);
163+
has_streaming => 1);
158164

159165
my $connstr_1 = $primary->connstr;
160166
$standby->append_conf(

0 commit comments

Comments
 (0)