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

Skip to content

merge crash safety #65

Closed
Closed
@gsmolk

Description

@gsmolk

Currently, if during merge crash happens between:
https://github.com/postgrespro/pg_probackup/blob/master/src/merge.c#L379
https://github.com/postgrespro/pg_probackup/blob/master/src/merge.c#L425

We will get an OK FULL backup which state is the same as incremental backup it was merged with, BUT with old backup_id, which can be dangerous since parent_link trust backup_id and another incremental backup, which was another child of old FULL backup, will consider this new backup as it`s parent. This is an invititation to data loss (or gain ^_^ ) and that is bad:

PAGE1        PAGE2
      \     /   
        FULL

Following test illustrate this problem:
python -m unittest -v tests.merge.MergeTest.test_failed_merge_after_delete_1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions