postgrespro / pg_probackup

Backup and recovery manager for PostgreSQL
https://postgrespro.github.io/pg_probackup/
Other
703 stars 86 forks source link

Does this conditional branch have any special meaning? #591

Closed zxbzswxr closed 1 year ago

zxbzswxr commented 1 year ago

https://github.com/postgrespro/pg_probackup/blob/7792b98a998706ca5e6fb203e1b07384eec6d9cc/src/merge.c#L339-L341

what if we rewrite it as if(full_backup->status == BACKUP_STATUS_MERGED && dest_backup->start_time != full_backup->merge_dest_backup)
......

fukanchik commented 1 year ago

Thanks, for reporting this! We suspect it should be MERGED+MERGING. Will be fixed in one of the next releases.

zxbzswxr commented 1 year ago

Thanks, for reporting this! We suspect it should be MERGED+MERGING. Will be fixed in one of the next releases.

so, it will be if ((full_backup->status == BACKUP_STATUS_MERGED || full_backup->status == BACKUP_STATUS_MERGING) && dest_backup->start_time != full_backup->merge_dest_backup)
..... ? that's all ??

fukanchik commented 1 year ago

Yes

zxbzswxr commented 1 year ago

Yes

Thank you.