...
If we observe only CP begin and there is no CP end marker that means CP not finished; we have not consistent page store.
For crash without CP at the moment when there was no checkpoint process running restore is simpletrivial, only logical record are applied.
Physical records (page snapshots and delta records) are ignored because page store is consistent.
Let’s suppose crash occurred at the middle of checkpoint. In that case restore process will discover markers for 1 CP1 and 2 start and CP 1 end.
For
Restore is split to 2 stages:
1st stage: Starting from previous completed checkpoint
...
record CP1 till record of CP2 start (incompleted) we apply all physical records and ignore logical.
2nd stage: Starting from marker of incomplete CP2 we apply only logical records until end of WAL is reached.
When replay is finished CP2 end marker will be added.
If transaction begin record has no corresponding end, tx change is not applied.
...