Content-Length: 275728 | pFad | http://github.com/postgrespro/postgres/commit/2af72cefeaa15e27277d327783fdec2748d9b758

17 Add missing Assert and fix inaccurate elog message in standby_redo(). · postgrespro/postgres@2af72ce · GitHub
Skip to content

Commit 2af72ce

Browse files
committed
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.
1 parent 9bff078 commit 2af72ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/storage/ipc/standby.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ standby_redo(XLogRecPtr lsn, XLogRecord *record)
718718
{
719719
uint8 info = record->xl_info & ~XLR_INFO_MASK;
720720

721+
/* Backup blocks are not used in standby records */
722+
Assert(!(record->xl_info & XLR_BKP_BLOCK_MASK));
723+
721724
/* Do nothing if we're not in hot standby mode */
722725
if (standbyState == STANDBY_DISABLED)
723726
return;
@@ -747,7 +750,7 @@ standby_redo(XLogRecPtr lsn, XLogRecord *record)
747750
ProcArrayApplyRecoveryInfo(&running);
748751
}
749752
else
750-
elog(PANIC, "relation_redo: unknown op code %u", info);
753+
elog(PANIC, "standby_redo: unknown op code %u", info);
751754
}
752755

753756
static void

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/2af72cefeaa15e27277d327783fdec2748d9b758

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy