Tom Lane  committed 2af72ce

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.

  • Participants
  • Parent commits 9bff078
  • Branches jsonapi

Comments (0)

Files changed (1)

File src/backend/storage/ipc/standby.c

 	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)
-		elog(PANIC, "relation_redo: unknown op code %u", info);
+		elog(PANIC, "standby_redo: unknown op code %u", info);
 static void