diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2012-02-04 22:32:35 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2012-02-04 22:32:35 -0500 |
commit | 2af72cefeaa15e27277d327783fdec2748d9b758 (patch) | |
tree | c7b0a2bbf2257bb2616fc30625e3ad3173f0baa9 /src | |
parent | 9bff0780cf5be2193a5bad0d3df2dbe143085264 (diff) | |
download | postgresql-2af72cefeaa15e27277d327783fdec2748d9b758.tar.gz postgresql-2af72cefeaa15e27277d327783fdec2748d9b758.zip |
Add missing Assert and fix inaccurate elog message in standby_redo().
All other WAL redo routines either call RestoreBkpBlocks() or Assert that
they haven't been passed any backup blocks. Make this one do likewise.
Also, fix incorrect routine name in its failure message.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/storage/ipc/standby.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index dc6833b3b14..2924d0ff65d 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -718,6 +718,9 @@ standby_redo(XLogRecPtr lsn, XLogRecord *record) { uint8 info = record->xl_info & ~XLR_INFO_MASK; + /* Backup blocks are not used in standby records */ + Assert(!(record->xl_info & XLR_BKP_BLOCK_MASK)); + /* Do nothing if we're not in hot standby mode */ if (standbyState == STANDBY_DISABLED) return; @@ -747,7 +750,7 @@ standby_redo(XLogRecPtr lsn, XLogRecord *record) ProcArrayApplyRecoveryInfo(&running); } else - elog(PANIC, "relation_redo: unknown op code %u", info); + elog(PANIC, "standby_redo: unknown op code %u", info); } static void |