mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
pgindent run for 9.5
This commit is contained in:
@ -1086,50 +1086,53 @@ DecodeXLogRecord(XLogReaderState *state, XLogRecord *record, char **errormsg)
|
||||
blk->bimg_len == BLCKSZ))
|
||||
{
|
||||
report_invalid_record(state,
|
||||
"BKPIMAGE_HAS_HOLE set, but hole offset %u length %u block image length %u at %X/%X",
|
||||
"BKPIMAGE_HAS_HOLE set, but hole offset %u length %u block image length %u at %X/%X",
|
||||
(unsigned int) blk->hole_offset,
|
||||
(unsigned int) blk->hole_length,
|
||||
(unsigned int) blk->bimg_len,
|
||||
(uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* cross-check that hole_offset == 0 and hole_length == 0
|
||||
* if the HAS_HOLE flag is not set.
|
||||
* cross-check that hole_offset == 0 and hole_length == 0 if
|
||||
* the HAS_HOLE flag is not set.
|
||||
*/
|
||||
if (!(blk->bimg_info & BKPIMAGE_HAS_HOLE) &&
|
||||
(blk->hole_offset != 0 || blk->hole_length != 0))
|
||||
{
|
||||
report_invalid_record(state,
|
||||
"BKPIMAGE_HAS_HOLE not set, but hole offset %u length %u at %X/%X",
|
||||
"BKPIMAGE_HAS_HOLE not set, but hole offset %u length %u at %X/%X",
|
||||
(unsigned int) blk->hole_offset,
|
||||
(unsigned int) blk->hole_length,
|
||||
(uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* cross-check that bimg_len < BLCKSZ
|
||||
* if the IS_COMPRESSED flag is set.
|
||||
* cross-check that bimg_len < BLCKSZ if the IS_COMPRESSED
|
||||
* flag is set.
|
||||
*/
|
||||
if ((blk->bimg_info & BKPIMAGE_IS_COMPRESSED) &&
|
||||
blk->bimg_len == BLCKSZ)
|
||||
{
|
||||
report_invalid_record(state,
|
||||
"BKPIMAGE_IS_COMPRESSED set, but block image length %u at %X/%X",
|
||||
"BKPIMAGE_IS_COMPRESSED set, but block image length %u at %X/%X",
|
||||
(unsigned int) blk->bimg_len,
|
||||
(uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* cross-check that bimg_len = BLCKSZ if neither
|
||||
* HAS_HOLE nor IS_COMPRESSED flag is set.
|
||||
* cross-check that bimg_len = BLCKSZ if neither HAS_HOLE nor
|
||||
* IS_COMPRESSED flag is set.
|
||||
*/
|
||||
if (!(blk->bimg_info & BKPIMAGE_HAS_HOLE) &&
|
||||
!(blk->bimg_info & BKPIMAGE_IS_COMPRESSED) &&
|
||||
blk->bimg_len != BLCKSZ)
|
||||
{
|
||||
report_invalid_record(state,
|
||||
"neither BKPIMAGE_HAS_HOLE nor BKPIMAGE_IS_COMPRESSED set, but block image length is %u at %X/%X",
|
||||
"neither BKPIMAGE_HAS_HOLE nor BKPIMAGE_IS_COMPRESSED set, but block image length is %u at %X/%X",
|
||||
(unsigned int) blk->data_len,
|
||||
(uint32) (state->ReadRecPtr >> 32), (uint32) state->ReadRecPtr);
|
||||
goto err;
|
||||
@ -1294,8 +1297,8 @@ bool
|
||||
RestoreBlockImage(XLogReaderState *record, uint8 block_id, char *page)
|
||||
{
|
||||
DecodedBkpBlock *bkpb;
|
||||
char *ptr;
|
||||
char tmp[BLCKSZ];
|
||||
char *ptr;
|
||||
char tmp[BLCKSZ];
|
||||
|
||||
if (!record->blocks[block_id].in_use)
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user