PostgreSQL Source Code git master
|
#include "access/xlogreader.h"
#include "lib/stringinfo.h"
#include "storage/block.h"
#include "storage/relfilelocator.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 RelFileLocator *rlocator, 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.
#define SMGR_TRUNCATE_FSM 0x0004 |
Definition at line 42 of file storage_xlog.h.
#define SMGR_TRUNCATE_HEAP 0x0001 |
Definition at line 40 of file storage_xlog.h.
#define SMGR_TRUNCATE_VM 0x0002 |
Definition at line 41 of file storage_xlog.h.
#define XLOG_SMGR_CREATE 0x10 |
Definition at line 30 of file storage_xlog.h.
#define XLOG_SMGR_TRUNCATE 0x20 |
Definition at line 31 of file storage_xlog.h.
typedef struct xl_smgr_create xl_smgr_create |
typedef struct xl_smgr_truncate xl_smgr_truncate |
void log_smgrcreate | ( | const RelFileLocator * | rlocator, |
ForkNumber | forkNum | ||
) |
Definition at line 186 of file storage.c.
References xl_smgr_create::forkNum, xl_smgr_create::rlocator, XLOG_SMGR_CREATE, XLogBeginInsert(), XLogInsert(), XLogRegisterData(), and XLR_SPECIAL_REL_UPDATE.
Referenced by CreateAndCopyRelationData(), fill_seq_with_data(), heapam_relation_copy_data(), heapam_relation_set_new_filelocator(), index_build(), 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, buf, xl_smgr_truncate::flags, xl_smgr_create::forkNum, MAIN_FORKNUM, pfree(), relpathperm, xl_smgr_create::rlocator, xl_smgr_truncate::rlocator, XLOG_SMGR_CREATE, XLOG_SMGR_TRUNCATE, XLogRecGetData, and XLogRecGetInfo.
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 965 of file storage.c.
References Assert, xl_smgr_truncate::blkno, BlockNumberIsValid(), CreateFakeRelcacheEntry(), elog, END_CRIT_SECTION, XLogReaderState::EndRecPtr, xl_smgr_truncate::flags, xl_smgr_create::forkNum, FreeFakeRelcacheEntry(), FreeSpaceMapPrepareTruncateRel(), FreeSpaceMapVacuumRange(), FSM_FORKNUM, INVALID_PROC_NUMBER, InvalidBlockNumber, MAIN_FORKNUM, MAX_FORKNUM, PANIC, xl_smgr_create::rlocator, xl_smgr_truncate::rlocator, SMGR_TRUNCATE_FSM, SMGR_TRUNCATE_HEAP, SMGR_TRUNCATE_VM, smgrcreate(), smgrexists(), smgrnblocks(), smgropen(), smgrtruncate(), START_CRIT_SECTION, VISIBILITYMAP_FORKNUM, visibilitymap_prepare_truncate(), XLOG_SMGR_CREATE, XLOG_SMGR_TRUNCATE, XLogFlush(), XLogRecGetData, XLogRecGetInfo, XLogRecHasAnyBlockRefs, and XLogTruncateRelation().