• Tom Lane's avatar
    Move BKP_REMOVABLE bit from individual WAL records to WAL page headers. · 2dd9322b
    Tom Lane authored
    Removing this bit from xl_info allows us to restore the old limit of four
    (not three) separate pages touched by a WAL record, which is needed for the
    upcoming SP-GiST feature, and will likely be useful elsewhere in future.
    
    When we implemented XLR_BKP_REMOVABLE in 2007, we had to do it like that
    because no special WAL-visible action was taken when starting a backup.
    However, now we force a segment switch when starting a backup, so a
    compressing WAL archiver (such as pglesslog) that uses the state shown in
    the current page header will not be fooled as to removability of backup
    blocks.  The only downside is that the archiver will not return to
    compressing mode for up to one WAL page after the backup is over, which is
    a small price to pay for getting back the extra xl_info bit.  In any case
    the archiver could look for XLOG_BACKUP_END records if it thought it was
    worth the trouble to do so.
    
    Bump XLOG_PAGE_MAGIC since this is effectively a change in WAL format.
    2dd9322b
xlog.c 301 KB