PostgreSQL Source Code
git master
|
#include "access/xlogreader.h"
#include "lib/stringinfo.h"
#include "storage/block.h"
#include "storage/relfilenode.h"
Go to the source code of this file.
Data Structures | |
struct | xl_smgr_create |
struct | xl_smgr_truncate |
Macros | |
#define | XLOG_SMGR_CREATE 0x10 |
#define | XLOG_SMGR_TRUNCATE 0x20 |
#define | SMGR_TRUNCATE_HEAP 0x0001 |
#define | SMGR_TRUNCATE_VM 0x0002 |
#define | SMGR_TRUNCATE_FSM 0x0004 |
#define | SMGR_TRUNCATE_ALL (SMGR_TRUNCATE_HEAP|SMGR_TRUNCATE_VM|SMGR_TRUNCATE_FSM) |
Typedefs | |
typedef struct xl_smgr_create | xl_smgr_create |
typedef struct xl_smgr_truncate | xl_smgr_truncate |
Functions | |
void | log_smgrcreate (const RelFileNode *rnode, ForkNumber forkNum) |
void | smgr_redo (XLogReaderState *record) |
void | smgr_desc (StringInfo buf, XLogReaderState *record) |
const char * | smgr_identify (uint8 info) |
#define SMGR_TRUNCATE_ALL (SMGR_TRUNCATE_HEAP|SMGR_TRUNCATE_VM|SMGR_TRUNCATE_FSM) |
Definition at line 43 of file storage_xlog.h.
Referenced by RelationTruncate().
#define SMGR_TRUNCATE_FSM 0x0004 |
Definition at line 42 of file storage_xlog.h.
Referenced by smgr_redo().
#define SMGR_TRUNCATE_HEAP 0x0001 |
Definition at line 40 of file storage_xlog.h.
Referenced by smgr_redo().
#define SMGR_TRUNCATE_VM 0x0002 |
Definition at line 41 of file storage_xlog.h.
Referenced by pg_truncate_visibility_map(), and smgr_redo().
#define XLOG_SMGR_CREATE 0x10 |
Definition at line 30 of file storage_xlog.h.
Referenced by extractPageInfo(), log_smgrcreate(), smgr_desc(), smgr_identify(), and smgr_redo().
#define XLOG_SMGR_TRUNCATE 0x20 |
Definition at line 31 of file storage_xlog.h.
Referenced by extractPageInfo(), pg_truncate_visibility_map(), RelationTruncate(), smgr_desc(), smgr_identify(), and smgr_redo().
typedef struct xl_smgr_create xl_smgr_create |
typedef struct xl_smgr_truncate xl_smgr_truncate |
void log_smgrcreate | ( | const RelFileNode * | rnode, |
ForkNumber | forkNum | ||
) |
Definition at line 175 of file storage.c.
References xl_smgr_create::forkNum, xl_smgr_create::rnode, XLOG_SMGR_CREATE, XLogBeginInsert(), XLogInsert(), XLogRegisterData(), and XLR_SPECIAL_REL_UPDATE.
Referenced by heapam_relation_copy_data(), heapam_relation_set_new_filenode(), index_copy_data(), and RelationCreateStorage().
void smgr_desc | ( | StringInfo | buf, |
XLogReaderState * | record | ||
) |
Definition at line 21 of file smgrdesc.c.
References appendStringInfo(), appendStringInfoString(), xl_smgr_truncate::blkno, xl_smgr_truncate::flags, xl_smgr_create::forkNum, MAIN_FORKNUM, pfree(), relpathperm, xl_smgr_create::rnode, xl_smgr_truncate::rnode, XLOG_SMGR_CREATE, XLOG_SMGR_TRUNCATE, XLogRecGetData, XLogRecGetInfo, and XLR_INFO_MASK.
const char* smgr_identify | ( | uint8 | info | ) |
Definition at line 46 of file smgrdesc.c.
References XLOG_SMGR_CREATE, XLOG_SMGR_TRUNCATE, and XLR_INFO_MASK.
void smgr_redo | ( | XLogReaderState * | record | ) |
Definition at line 904 of file storage.c.
References Assert, xl_smgr_truncate::blkno, BlockNumberIsValid, blocks, CreateFakeRelcacheEntry(), elog, XLogReaderState::EndRecPtr, xl_smgr_truncate::flags, xl_smgr_create::forkNum, FreeFakeRelcacheEntry(), FreeSpaceMapPrepareTruncateRel(), FreeSpaceMapVacuumRange(), FSM_FORKNUM, InvalidBackendId, InvalidBlockNumber, MAIN_FORKNUM, MAX_FORKNUM, PANIC, xl_smgr_create::rnode, xl_smgr_truncate::rnode, SMGR_TRUNCATE_FSM, SMGR_TRUNCATE_HEAP, SMGR_TRUNCATE_VM, smgrcreate(), smgrexists(), smgropen(), smgrtruncate(), VISIBILITYMAP_FORKNUM, visibilitymap_prepare_truncate(), XLOG_SMGR_CREATE, XLOG_SMGR_TRUNCATE, XLogFlush(), XLogRecGetData, XLogRecGetInfo, XLogRecHasAnyBlockRefs, XLogTruncateRelation(), and XLR_INFO_MASK.