From 9187cedd7c9b8c3e9e62a1686ecdbd9ede87f052 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Fri, 23 Jan 2009 11:19:34 +0000 Subject: [PATCH] Put back fast-path for the case that there's no backup blocks in RestoreBkpBlocks. Went missing in my recent refactoring patch, as pointed out by Simon's hot standby patch. --- src/backend/access/transam/xlog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index bf85d2ffae..b291b09bca 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.328 2009/01/20 18:59:37 heikki Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.329 2009/01/23 11:19:34 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -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++) { -- 2.40.0