PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
xlogrecord.h File Reference
#include "access/rmgr.h"
#include "access/xlogdefs.h"
#include "port/pg_crc32c.h"
#include "storage/block.h"
#include "storage/relfilenode.h"
Include dependency graph for xlogrecord.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  XLogRecord
 
struct  XLogRecordBlockHeader
 
struct  XLogRecordBlockImageHeader
 
struct  XLogRecordBlockCompressHeader
 
struct  XLogRecordDataHeaderShort
 
struct  XLogRecordDataHeaderLong
 

Macros

#define SizeOfXLogRecord   (offsetof(XLogRecord, xl_crc) + sizeof(pg_crc32c))
 
#define XLR_INFO_MASK   0x0F
 
#define XLR_RMGR_INFO_MASK   0xF0
 
#define XLR_SPECIAL_REL_UPDATE   0x01
 
#define XLR_CHECK_CONSISTENCY   0x02
 
#define SizeOfXLogRecordBlockHeader   (offsetof(XLogRecordBlockHeader, data_length) + sizeof(uint16))
 
#define SizeOfXLogRecordBlockImageHeader   (offsetof(XLogRecordBlockImageHeader, bimg_info) + sizeof(uint8))
 
#define BKPIMAGE_HAS_HOLE   0x01 /* page image has "hole" */
 
#define BKPIMAGE_IS_COMPRESSED   0x02 /* page image is compressed */
 
#define BKPIMAGE_APPLY   0x04 /* page image should be restored during replay */
 
#define SizeOfXLogRecordBlockCompressHeader   sizeof(XLogRecordBlockCompressHeader)
 
#define MaxSizeOfXLogRecordBlockHeader
 
#define BKPBLOCK_FORK_MASK   0x0F
 
#define BKPBLOCK_FLAG_MASK   0xF0
 
#define BKPBLOCK_HAS_IMAGE   0x10 /* block data is an XLogRecordBlockImage */
 
#define BKPBLOCK_HAS_DATA   0x20
 
#define BKPBLOCK_WILL_INIT   0x40 /* redo will re-init the page */
 
#define BKPBLOCK_SAME_REL   0x80 /* RelFileNode omitted, same as previous */
 
#define SizeOfXLogRecordDataHeaderShort   (sizeof(uint8) * 2)
 
#define SizeOfXLogRecordDataHeaderLong   (sizeof(uint8) + sizeof(uint32))
 
#define XLR_MAX_BLOCK_ID   32
 
#define XLR_BLOCK_ID_DATA_SHORT   255
 
#define XLR_BLOCK_ID_DATA_LONG   254
 
#define XLR_BLOCK_ID_ORIGIN   253
 

Typedefs

typedef struct XLogRecord XLogRecord
 
typedef struct
XLogRecordBlockHeader 
XLogRecordBlockHeader
 
typedef struct
XLogRecordBlockImageHeader 
XLogRecordBlockImageHeader
 
typedef struct
XLogRecordBlockCompressHeader 
XLogRecordBlockCompressHeader
 
typedef struct
XLogRecordDataHeaderShort 
XLogRecordDataHeaderShort
 
typedef struct
XLogRecordDataHeaderLong 
XLogRecordDataHeaderLong
 

Macro Definition Documentation

#define BKPBLOCK_FLAG_MASK   0xF0

Definition at line 179 of file xlogrecord.h.

#define BKPBLOCK_FORK_MASK   0x0F

Definition at line 178 of file xlogrecord.h.

Referenced by DecodeXLogRecord().

#define BKPBLOCK_HAS_DATA   0x20

Definition at line 181 of file xlogrecord.h.

Referenced by DecodeXLogRecord(), and XLogRecordAssemble().

#define BKPBLOCK_HAS_IMAGE   0x10 /* block data is an XLogRecordBlockImage */

Definition at line 180 of file xlogrecord.h.

Referenced by DecodeXLogRecord(), and XLogRecordAssemble().

#define BKPBLOCK_SAME_REL   0x80 /* RelFileNode omitted, same as previous */

Definition at line 183 of file xlogrecord.h.

Referenced by DecodeXLogRecord(), and XLogRecordAssemble().

#define BKPBLOCK_WILL_INIT   0x40 /* redo will re-init the page */

Definition at line 182 of file xlogrecord.h.

Referenced by XLogReadBufferForRedoExtended(), and XLogRecordAssemble().

#define BKPIMAGE_APPLY   0x04 /* page image should be restored during replay */

Definition at line 149 of file xlogrecord.h.

Referenced by DecodeXLogRecord(), and XLogRecordAssemble().

#define BKPIMAGE_HAS_HOLE   0x01 /* page image has "hole" */

Definition at line 147 of file xlogrecord.h.

Referenced by DecodeXLogRecord(), and XLogRecordAssemble().

#define BKPIMAGE_IS_COMPRESSED   0x02 /* page image is compressed */
#define MaxSizeOfXLogRecordBlockHeader
Value:
sizeof(RelFileNode) + \
sizeof(BlockNumber))
uint32 BlockNumber
Definition: block.h:31
#define SizeOfXLogRecordBlockImageHeader
Definition: xlogrecord.h:143
#define SizeOfXLogRecordBlockCompressHeader
Definition: xlogrecord.h:160
#define SizeOfXLogRecordBlockHeader
Definition: xlogrecord.h:104

Definition at line 167 of file xlogrecord.h.

#define SizeOfXLogRecordBlockCompressHeader   sizeof(XLogRecordBlockCompressHeader)

Definition at line 160 of file xlogrecord.h.

Referenced by XLogCompressBackupBlock(), and XLogRecordAssemble().

#define SizeOfXLogRecordBlockHeader   (offsetof(XLogRecordBlockHeader, data_length) + sizeof(uint16))

Definition at line 104 of file xlogrecord.h.

Referenced by XLogRecordAssemble().

#define SizeOfXLogRecordBlockImageHeader   (offsetof(XLogRecordBlockImageHeader, bimg_info) + sizeof(uint8))

Definition at line 143 of file xlogrecord.h.

Referenced by XLogRecordAssemble().

#define SizeOfXLogRecordDataHeaderLong   (sizeof(uint8) + sizeof(uint32))

Definition at line 208 of file xlogrecord.h.

#define SizeOfXLogRecordDataHeaderShort   (sizeof(uint8) * 2)

Definition at line 200 of file xlogrecord.h.

Referenced by BootStrapXLOG(), ReadCheckpointRecord(), and WriteEmptyXLOG().

#define XLR_BLOCK_ID_DATA_LONG   254

Definition at line 224 of file xlogrecord.h.

Referenced by DecodeXLogRecord(), and XLogRecordAssemble().

#define XLR_BLOCK_ID_DATA_SHORT   255

Definition at line 223 of file xlogrecord.h.

Referenced by BootStrapXLOG(), DecodeXLogRecord(), WriteEmptyXLOG(), and XLogRecordAssemble().

#define XLR_BLOCK_ID_ORIGIN   253

Definition at line 225 of file xlogrecord.h.

Referenced by DecodeXLogRecord(), and XLogRecordAssemble().

#define XLR_CHECK_CONSISTENCY   0x02

Definition at line 80 of file xlogrecord.h.

Referenced by checkXLogConsistency(), StartupXLOG(), XLogInsert(), and XLogRecordAssemble().

#define XLR_MAX_BLOCK_ID   32

Definition at line 221 of file xlogrecord.h.

Referenced by DecodeXLogRecord(), XLogEnsureRecordSpace(), and XLogReaderFree().

#define XLR_RMGR_INFO_MASK   0xF0

Definition at line 63 of file xlogrecord.h.

Referenced by XLogInsert().

#define XLR_SPECIAL_REL_UPDATE   0x01

Typedef Documentation