mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2026-06-21 01:34:15 +02:00
ignore lock_file absense in release_shared_lock_file
It were ignored until f6e7be6d . Lets put that nuance back.
TODO: should find why we call `release_shared_lock_file` without lock held.
This commit is contained in:
+7
-1
@@ -766,7 +766,13 @@ release_shared_lock_file(const char *backup_dir)
|
||||
if (pids.len == 0)
|
||||
{
|
||||
ft_arr_pid_free(&pids);
|
||||
if (remove(lock_file) != 0)
|
||||
/*
|
||||
* TODO: we should not call 'release_shared_lock_file' if we don't hold it.
|
||||
* Therefore we should not ignore ENOENT.
|
||||
* We should find why ENOENT happens, but until then lets ignore it as
|
||||
* it were ignored for a while.
|
||||
*/
|
||||
if (remove(lock_file) != 0 && errno != ENOENT)
|
||||
elog(ERROR, "Cannot remove shared lock file \"%s\": %s", lock_file, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user