Skip to content

Commit 48639c7

Browse files
committed
ugly fix: exclusive locks are incorrectly released multiple times, previosly errors was not checked
1 parent e78b882 commit 48639c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/catalog.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,8 @@ release_excl_lock_file(const char *backup_dir)
732732
/* TODO Sanity check: maybe we should check, that pid in lock file is my_pid */
733733

734734
/* remove pid file */
735-
if (fio_remove(FIO_BACKUP_HOST, lock_file, false) != 0)
735+
/* exclusive locks releasing multiple times -> missing_ok = true */
736+
if (fio_remove(FIO_BACKUP_HOST, lock_file, true) != 0)
736737
elog(ERROR, "Cannot remove exclusive lock file \"%s\": %s", lock_file, strerror(errno));
737738
}
738739

0 commit comments

Comments
 (0)