Put back fast-path for the case that there's no backup blocks in
authorHeikki Linnakangas <heikki@enterprisedb.com>
Fri, 23 Jan 2009 11:19:34 +0000 (11:19 +0000)
committerHeikki Linnakangas <heikki@enterprisedb.com>
Fri, 23 Jan 2009 11:19:34 +0000 (11:19 +0000)
RestoreBkpBlocks. Went missing in my recent refactoring patch, as pointed
out by Simon's hot standby patch.

src/backend/access/transam/xlog.c

index bd6035d4a692ac8d15d45498598bb203b9f32790..00f345cecc972341a6e14e2ce95a6edb2dce3efb 100644 (file)
@@ -2938,6 +2938,9 @@ RestoreBkpBlocks(XLogRecPtr lsn, XLogRecord *record, bool cleanup)
        char       *blk;
        int                     i;
 
+       if (!(record->xl_info & XLR_BKP_BLOCK_MASK))
+               return;
+
        blk = (char *) XLogRecGetData(record) + record->xl_len;
        for (i = 0; i < XLR_MAX_BKP_BLOCKS; i++)
        {