mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-04-11 11:52:02 +02:00
Function pg_atomic_test_set_flag returns true if the flag has successfully been set, false otherwise
This commit is contained in:
parent
9a1e5ba044
commit
83d64c5b9d
@ -383,7 +383,7 @@ remote_backup_files(void *arg)
|
||||
if (S_ISDIR(file->mode))
|
||||
continue;
|
||||
|
||||
if (pg_atomic_test_set_flag(&file->lock))
|
||||
if (!pg_atomic_test_set_flag(&file->lock))
|
||||
continue;
|
||||
|
||||
file_backup_conn = pgut_connect_replication(pgut_dbname);
|
||||
|
@ -710,7 +710,7 @@ restore_files(void *arg)
|
||||
char *rel_path;
|
||||
pgFile *file = (pgFile *) parray_get(arguments->files, i);
|
||||
|
||||
if (pg_atomic_test_set_flag(&file->lock))
|
||||
if (!pg_atomic_test_set_flag(&file->lock))
|
||||
continue;
|
||||
|
||||
pgBackupGetPath(arguments->backup, from_root,
|
||||
|
@ -139,7 +139,7 @@ pgBackupValidateFiles(void *arg)
|
||||
struct stat st;
|
||||
|
||||
pgFile *file = (pgFile *) parray_get(arguments->files, i);
|
||||
if (pg_atomic_test_set_flag(&file->lock))
|
||||
if (!pg_atomic_test_set_flag(&file->lock))
|
||||
continue;
|
||||
|
||||
if (interrupted)
|
||||
|
Loading…
x
Reference in New Issue
Block a user