PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/xact.h"
#include "access/xlog.h"
#include "access/xlog_internal.h"
#include "access/xloginsert.h"
#include "catalog/pg_control.h"
#include "common/pg_lzcompress.h"
#include "miscadmin.h"
#include "pg_trace.h"
#include "replication/origin.h"
#include "storage/bufmgr.h"
#include "storage/proc.h"
#include "utils/memutils.h"
Go to the source code of this file.
Data Structures | |
struct | registered_buffer |
Macros | |
#define | LZ4_MAX_BLCKSZ 0 |
#define | ZSTD_MAX_BLCKSZ 0 |
#define | PGLZ_MAX_BLCKSZ PGLZ_MAX_OUTPUT(BLCKSZ) |
#define | COMPRESS_BUFSIZE Max(Max(PGLZ_MAX_BLCKSZ, LZ4_MAX_BLCKSZ), ZSTD_MAX_BLCKSZ) |
#define | SizeOfXlogOrigin (sizeof(RepOriginId) + sizeof(char)) |
#define | SizeOfXLogTransactionId (sizeof(TransactionId) + sizeof(char)) |
#define | HEADER_SCRATCH_SIZE |
Functions | |
static XLogRecData * | XLogRecordAssemble (RmgrId rmid, uint8 info, XLogRecPtr RedoRecPtr, bool doPageWrites, XLogRecPtr *fpw_lsn, int *num_fpi, bool *topxid_included) |
static bool | XLogCompressBackupBlock (const char *page, uint16 hole_offset, uint16 hole_length, char *dest, uint16 *dlen) |
void | XLogBeginInsert (void) |
void | XLogEnsureRecordSpace (int max_block_id, int ndatas) |
void | XLogResetInsertion (void) |
void | XLogRegisterBuffer (uint8 block_id, Buffer buffer, uint8 flags) |
void | XLogRegisterBlock (uint8 block_id, RelFileLocator *rlocator, ForkNumber forknum, BlockNumber blknum, const char *page, uint8 flags) |
void | XLogRegisterData (const char *data, uint32 len) |
void | XLogRegisterBufData (uint8 block_id, const char *data, uint32 len) |
void | XLogSetRecordFlags (uint8 flags) |
XLogRecPtr | XLogInsert (RmgrId rmid, uint8 info) |
bool | XLogCheckBufferNeedsBackup (Buffer buffer) |
XLogRecPtr | XLogSaveBufferForHint (Buffer buffer, bool buffer_std) |
XLogRecPtr | log_newpage (RelFileLocator *rlocator, ForkNumber forknum, BlockNumber blkno, Page page, bool page_std) |
void | log_newpages (RelFileLocator *rlocator, ForkNumber forknum, int num_pages, BlockNumber *blknos, Page *pages, bool page_std) |
XLogRecPtr | log_newpage_buffer (Buffer buffer, bool page_std) |
void | log_newpage_range (Relation rel, ForkNumber forknum, BlockNumber startblk, BlockNumber endblk, bool page_std) |
void | InitXLogInsert (void) |
Variables | |
static registered_buffer * | registered_buffers |
static int | max_registered_buffers |
static int | max_registered_block_id = 0 |
static XLogRecData * | mainrdata_head |
static XLogRecData * | mainrdata_last = (XLogRecData *) &mainrdata_head |
static uint64 | mainrdata_len |
static uint8 | curinsert_flags = 0 |
static XLogRecData | hdr_rdt |
static char * | hdr_scratch = NULL |
static XLogRecData * | rdatas |
static int | num_rdatas |
static int | max_rdatas |
static bool | begininsert_called = false |
static MemoryContext | xloginsert_cxt |
#define COMPRESS_BUFSIZE Max(Max(PGLZ_MAX_BLCKSZ, LZ4_MAX_BLCKSZ), ZSTD_MAX_BLCKSZ) |
Definition at line 62 of file xloginsert.c.
#define HEADER_SCRATCH_SIZE |
Definition at line 119 of file xloginsert.c.
#define LZ4_MAX_BLCKSZ 0 |
Definition at line 50 of file xloginsert.c.
#define PGLZ_MAX_BLCKSZ PGLZ_MAX_OUTPUT(BLCKSZ) |
Definition at line 59 of file xloginsert.c.
#define SizeOfXlogOrigin (sizeof(RepOriginId) + sizeof(char)) |
Definition at line 116 of file xloginsert.c.
#define SizeOfXLogTransactionId (sizeof(TransactionId) + sizeof(char)) |
Definition at line 117 of file xloginsert.c.
#define ZSTD_MAX_BLCKSZ 0 |
Definition at line 56 of file xloginsert.c.
void InitXLogInsert | ( | void | ) |
Definition at line 1348 of file xloginsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, AllocSizeIsValid, Assert, DecodeXLogRecordRequiredSpace(), hdr_scratch, HEADER_SCRATCH_SIZE, max_rdatas, max_registered_buffers, MemoryContextAlloc(), MemoryContextAllocZero(), rdatas, registered_buffers, TopMemoryContext, xloginsert_cxt, XLogRecordMaxSize, XLR_NORMAL_MAX_BLOCK_ID, and XLR_NORMAL_RDATAS.
Referenced by BaseInit().
XLogRecPtr log_newpage | ( | RelFileLocator * | rlocator, |
ForkNumber | forknum, | ||
BlockNumber | blkno, | ||
Page | page, | ||
bool | page_std | ||
) |
Definition at line 1143 of file xloginsert.c.
References PageIsNew(), PageSetLSN(), REGBUF_FORCE_IMAGE, REGBUF_STANDARD, XLOG_FPI, XLogBeginInsert(), XLogInsert(), and XLogRegisterBlock().
Referenced by _hash_alloc_buckets(), _hash_init(), and log_newpage_buffer().
XLogRecPtr log_newpage_buffer | ( | Buffer | buffer, |
bool | page_std | ||
) |
Definition at line 1237 of file xloginsert.c.
References Assert, BufferGetPage(), BufferGetTag(), CritSectionCount, and log_newpage().
Referenced by brin_initialize_empty_new_buffer(), brinbuildempty(), FreeSpaceMapPrepareTruncateRel(), ginbuildempty(), gistbuildempty(), heap_force_common(), lazy_scan_new_or_empty(), RelationCopyStorageUsingBuffer(), and visibilitymap_prepare_truncate().
void log_newpage_range | ( | Relation | rel, |
ForkNumber | forknum, | ||
BlockNumber | startblk, | ||
BlockNumber | endblk, | ||
bool | page_std | ||
) |
Definition at line 1270 of file xloginsert.c.
References buf, BUFFER_LOCK_EXCLUSIVE, BufferGetPage(), CHECK_FOR_INTERRUPTS, END_CRIT_SECTION, i, LockBuffer(), MarkBufferDirty(), PageIsNew(), PageSetLSN(), RBM_NORMAL, ReadBufferExtended(), REGBUF_FORCE_IMAGE, REGBUF_STANDARD, START_CRIT_SECTION, UnlockReleaseBuffer(), XLOG_FPI, XLogBeginInsert(), XLogEnsureRecordSpace(), XLogInsert(), XLogRegisterBuffer(), and XLR_MAX_BLOCK_ID.
Referenced by ginbuild(), gistbuild(), smgrDoPendingSyncs(), and spgbuild().
void log_newpages | ( | RelFileLocator * | rlocator, |
ForkNumber | forknum, | ||
int | num_pages, | ||
BlockNumber * | blknos, | ||
Page * | pages, | ||
bool | page_std | ||
) |
Definition at line 1175 of file xloginsert.c.
References i, j, PageIsNew(), PageSetLSN(), REGBUF_FORCE_IMAGE, REGBUF_STANDARD, XLOG_FPI, XLogBeginInsert(), XLogEnsureRecordSpace(), XLogInsert(), XLogRegisterBlock(), and XLR_MAX_BLOCK_ID.
Referenced by smgr_bulk_flush().
void XLogBeginInsert | ( | void | ) |
Definition at line 149 of file xloginsert.c.
References Assert, begininsert_called, elog, ERROR, mainrdata_head, mainrdata_last, mainrdata_len, max_registered_block_id, and XLogInsertAllowed().
Referenced by _bt_allocbuf(), _bt_dedup_pass(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_mark_page_halfdead(), _bt_newlevel(), _bt_set_cleanup_info(), _bt_split(), _bt_unlink_halfdead_page(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_init(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), AssignTransactionId(), brin_doinsert(), brin_doupdate(), brinbuild(), brinRevmapDesummarizeRange(), CreateCheckPoint(), CreateDatabaseUsingFileCopy(), CreateDirAndVersionFile(), CreateEndOfRecoveryRecord(), CreateOverwriteContrecordRecord(), createPostingTree(), CreateTableSpace(), do_pg_backup_stop(), do_setval(), doPickSplit(), DropTableSpace(), EndPrepare(), ExecuteTruncateGuts(), fill_seq_fork_with_data(), GenericXLogFinish(), ginDeletePage(), ginHeapTupleFastInsert(), ginPlaceToPage(), ginUpdateStats(), ginVacuumPostingTreeLeaf(), gistXLogAssignLSN(), gistXLogDelete(), gistXLogPageDelete(), gistXLogPageReuse(), gistXLogSplit(), gistXLogUpdate(), hashbucketcleanup(), hashbulkdelete(), heap_abort_speculative(), heap_delete(), heap_finish_speculative(), heap_inplace_update_and_unlock(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_update(), log_heap_new_cid(), log_heap_prune_and_freeze(), log_heap_update(), log_heap_visible(), log_newpage(), log_newpage_range(), log_newpages(), log_smgrcreate(), log_split_page(), LogAccessExclusiveLocks(), LogCurrentRunningXacts(), logical_heap_rewrite_flush_mappings(), LogLogicalInvalidations(), LogLogicalMessage(), LogStandbyInvalidations(), movedb(), moveLeafs(), MultiXactIdCreateFromMembers(), nextval_internal(), pg_truncate_visibility_map(), RelationTruncate(), remove_dbtablespaces(), replorigin_advance(), replorigin_state_clear(), RequestXLogSwitch(), revmap_physical_extend(), shiftList(), spgAddNodeAction(), spgSplitNodeAction(), test_custom_rmgrs_insert_wal_record(), UpdateFullPageWrites(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), write_relmap_file(), writeListPage(), WriteMTruncateXlogRec(), WriteMZeroPageXlogRec(), WriteTruncateXlogRec(), WriteZeroPageXlogRec(), XactLogAbortRecord(), XactLogCommitRecord(), XLogPutNextOid(), XLogReportParameters(), XLogRestorePoint(), XLogSaveBufferForHint(), and xlogVacuumPage().
bool XLogCheckBufferNeedsBackup | ( | Buffer | buffer | ) |
Definition at line 1027 of file xloginsert.c.
References BufferGetPage(), doPageWrites, GetFullPageWriteInfo(), PageGetLSN(), and RedoRecPtr.
Referenced by heap_page_prune_and_freeze(), and log_heap_update().
|
static |
Definition at line 944 of file xloginsert.c.
References Assert, COMPRESS_BUFSIZE, PGAlignedBlock::data, generate_unaccent_rules::dest, elog, ERROR, len, pglz_compress(), PGLZ_strategy_default, SizeOfXLogRecordBlockCompressHeader, source, wal_compression, WAL_COMPRESSION_LZ4, WAL_COMPRESSION_NONE, WAL_COMPRESSION_PGLZ, and WAL_COMPRESSION_ZSTD.
Referenced by XLogRecordAssemble().
void XLogEnsureRecordSpace | ( | int | max_block_id, |
int | ndatas | ||
) |
Definition at line 175 of file xloginsert.c.
References Assert, CritSectionCount, elog, ERROR, max_rdatas, max_registered_buffers, MemSet, rdatas, registered_buffers, repalloc(), XLR_MAX_BLOCK_ID, XLR_NORMAL_MAX_BLOCK_ID, and XLR_NORMAL_RDATAS.
Referenced by _hash_freeovflpage(), _hash_squeezebucket(), EndPrepare(), gistplacetopage(), log_newpage_range(), log_newpages(), and shiftList().
XLogRecPtr XLogInsert | ( | RmgrId | rmid, |
uint8 | info | ||
) |
Definition at line 474 of file xloginsert.c.
References begininsert_called, curinsert_flags, doPageWrites, elog, ERROR, GetFullPageWriteInfo(), InvalidXLogRecPtr, IsBootstrapProcessingMode, PANIC, RedoRecPtr, SizeOfXLogLongPHD, XLogInsertRecord(), XLogRecordAssemble(), XLogResetInsertion(), XLR_CHECK_CONSISTENCY, XLR_RMGR_INFO_MASK, and XLR_SPECIAL_REL_UPDATE.
Referenced by _bt_allocbuf(), _bt_dedup_pass(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_mark_page_halfdead(), _bt_newlevel(), _bt_set_cleanup_info(), _bt_split(), _bt_unlink_halfdead_page(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_init(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), AssignTransactionId(), brin_doinsert(), brin_doupdate(), brinbuild(), brinRevmapDesummarizeRange(), CreateCheckPoint(), CreateDatabaseUsingFileCopy(), CreateDirAndVersionFile(), CreateEndOfRecoveryRecord(), CreateOverwriteContrecordRecord(), createPostingTree(), CreateTableSpace(), do_pg_backup_stop(), do_setval(), doPickSplit(), DropTableSpace(), EndPrepare(), ExecuteTruncateGuts(), fill_seq_fork_with_data(), GenericXLogFinish(), ginDeletePage(), ginHeapTupleFastInsert(), ginPlaceToPage(), ginUpdateStats(), ginVacuumPostingTreeLeaf(), gistXLogAssignLSN(), gistXLogDelete(), gistXLogPageDelete(), gistXLogPageReuse(), gistXLogSplit(), gistXLogUpdate(), hashbucketcleanup(), hashbulkdelete(), heap_abort_speculative(), heap_delete(), heap_finish_speculative(), heap_inplace_update_and_unlock(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_update(), log_heap_new_cid(), log_heap_prune_and_freeze(), log_heap_update(), log_heap_visible(), log_newpage(), log_newpage_range(), log_newpages(), log_smgrcreate(), log_split_page(), LogAccessExclusiveLocks(), LogCurrentRunningXacts(), logical_heap_rewrite_flush_mappings(), LogLogicalInvalidations(), LogLogicalMessage(), LogStandbyInvalidations(), movedb(), moveLeafs(), MultiXactIdCreateFromMembers(), nextval_internal(), pg_truncate_visibility_map(), RelationTruncate(), remove_dbtablespaces(), replorigin_advance(), replorigin_state_clear(), RequestXLogSwitch(), revmap_physical_extend(), shiftList(), spgAddNodeAction(), spgSplitNodeAction(), test_custom_rmgrs_insert_wal_record(), UpdateFullPageWrites(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), write_relmap_file(), writeListPage(), WriteMTruncateXlogRec(), WriteMZeroPageXlogRec(), WriteTruncateXlogRec(), WriteZeroPageXlogRec(), XactLogAbortRecord(), XactLogCommitRecord(), XLogPutNextOid(), XLogReportParameters(), XLogRestorePoint(), XLogSaveBufferForHint(), and xlogVacuumPage().
|
static |
Definition at line 548 of file xloginsert.c.
References Assert, XLogRecordBlockImageHeader::bimg_info, registered_buffer::bkp_rdatas, BKPBLOCK_HAS_DATA, BKPBLOCK_HAS_IMAGE, BKPBLOCK_SAME_REL, BKPBLOCK_WILL_INIT, BKPIMAGE_APPLY, BKPIMAGE_COMPRESS_LZ4, BKPIMAGE_COMPRESS_PGLZ, BKPIMAGE_COMPRESS_ZSTD, BKPIMAGE_HAS_HOLE, registered_buffer::block, COMP_CRC32C, registered_buffer::compressed_page, curinsert_flags, XLogRecData::data, XLogRecordBlockHeader::data_length, doPageWrites, elog, ereport, errdetail_internal(), errmsg_internal(), ERROR, registered_buffer::flags, XLogRecordBlockHeader::fork_flags, registered_buffer::forkno, GetCurrentTransactionIdIfAny(), GetTopTransactionIdIfAny(), hdr_rdt, hdr_scratch, XLogRecordBlockCompressHeader::hole_length, XLogRecordBlockImageHeader::hole_offset, XLogRecordBlockHeader::id, registered_buffer::in_use, INIT_CRC32C, InvalidRepOriginId, InvalidXLogRecPtr, IsSubxactTopXidLogPending(), XLogRecData::len, XLogRecordBlockImageHeader::length, lower(), mainrdata_head, mainrdata_last, mainrdata_len, max_registered_block_id, XLogRecData::next, registered_buffer::page, PageGetLSN(), PG_UINT32_MAX, registered_buffer::rdata_head, registered_buffer::rdata_len, registered_buffer::rdata_tail, RedoRecPtr, REGBUF_FORCE_IMAGE, REGBUF_KEEP_DATA, REGBUF_NO_IMAGE, REGBUF_STANDARD, REGBUF_WILL_INIT, registered_buffers, RelFileLocatorEquals, replorigin_session_origin, registered_buffer::rlocator, SizeOfPageHeaderData, SizeOfXLogRecord, SizeOfXLogRecordBlockCompressHeader, SizeOfXLogRecordBlockHeader, SizeOfXLogRecordBlockImageHeader, upper(), wal_compression, WAL_COMPRESSION_LZ4, WAL_COMPRESSION_NONE, WAL_COMPRESSION_PGLZ, WAL_COMPRESSION_ZSTD, wal_consistency_checking, XLogRecord::xl_crc, XLogRecord::xl_info, XLogRecord::xl_prev, XLogRecord::xl_rmid, XLogRecord::xl_tot_len, XLogRecord::xl_xid, XLOG_INCLUDE_ORIGIN, XLogCompressBackupBlock(), XLogRecordMaxSize, XLR_BLOCK_ID_DATA_LONG, XLR_BLOCK_ID_DATA_SHORT, XLR_BLOCK_ID_ORIGIN, XLR_BLOCK_ID_TOPLEVEL_XID, and XLR_CHECK_CONSISTENCY.
Referenced by XLogInsert().
void XLogRegisterBlock | ( | uint8 | block_id, |
RelFileLocator * | rlocator, | ||
ForkNumber | forknum, | ||
BlockNumber | blknum, | ||
const char * | page, | ||
uint8 | flags | ||
) |
Definition at line 309 of file xloginsert.c.
References Assert, begininsert_called, registered_buffer::block, elog, ERROR, registered_buffer::flags, for(), registered_buffer::forkno, i, registered_buffer::in_use, max_registered_block_id, max_registered_buffers, registered_buffer::page, registered_buffer::rdata_head, registered_buffer::rdata_len, registered_buffer::rdata_tail, registered_buffers, RelFileLocatorEquals, and registered_buffer::rlocator.
Referenced by heap_inplace_update_and_unlock(), log_newpage(), log_newpages(), and XLogSaveBufferForHint().
Definition at line 405 of file xloginsert.c.
References Assert, begininsert_called, XLogRecData::data, data, elog, ereport, errdetail_internal(), errmsg_internal(), ERROR, registered_buffer::in_use, XLogRecData::len, len, max_rdatas, XLogRecData::next, num_rdatas, registered_buffer::rdata_len, registered_buffer::rdata_tail, rdatas, and registered_buffers.
Referenced by _bt_dedup_pass(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_newlevel(), _bt_set_cleanup_info(), _bt_split(), _bt_unlink_halfdead_page(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_squeezebucket(), brin_doinsert(), brin_doupdate(), dataExecPlaceToPageInternal(), dataExecPlaceToPageLeaf(), entryExecPlaceToPage(), GenericXLogFinish(), ginHeapTupleFastInsert(), ginVacuumPostingTreeLeaf(), gistXLogSplit(), gistXLogUpdate(), hashbucketcleanup(), heap_inplace_update_and_unlock(), heap_insert(), heap_multi_insert(), log_heap_prune_and_freeze(), log_heap_update(), and writeListPage().
Definition at line 242 of file xloginsert.c.
References Assert, begininsert_called, registered_buffer::block, BufferGetPage(), BufferGetTag(), BufferIsDirty(), BufferIsExclusiveLocked(), elog, ERROR, registered_buffer::flags, for(), registered_buffer::forkno, i, registered_buffer::in_use, max_registered_block_id, max_registered_buffers, registered_buffer::page, registered_buffer::rdata_head, registered_buffer::rdata_len, registered_buffer::rdata_tail, REGBUF_FORCE_IMAGE, REGBUF_NO_CHANGE, REGBUF_NO_IMAGE, registered_buffers, RelFileLocatorEquals, and registered_buffer::rlocator.
Referenced by _bt_dedup_pass(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_mark_page_halfdead(), _bt_newlevel(), _bt_set_cleanup_info(), _bt_split(), _bt_unlink_halfdead_page(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_init(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), brin_doinsert(), brin_doupdate(), brinbuild(), brinRevmapDesummarizeRange(), createPostingTree(), dataExecPlaceToPageInternal(), dataExecPlaceToPageLeaf(), do_setval(), doPickSplit(), entryExecPlaceToPage(), fill_seq_fork_with_data(), GenericXLogFinish(), ginDeletePage(), ginHeapTupleFastInsert(), ginPlaceToPage(), ginUpdateStats(), ginVacuumPostingTreeLeaf(), gistXLogDelete(), gistXLogPageDelete(), gistXLogSplit(), gistXLogUpdate(), hashbucketcleanup(), hashbulkdelete(), heap_abort_speculative(), heap_delete(), heap_finish_speculative(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_update(), log_heap_prune_and_freeze(), log_heap_update(), log_heap_visible(), log_newpage_range(), log_split_page(), moveLeafs(), nextval_internal(), revmap_physical_extend(), shiftList(), spgAddNodeAction(), spgSplitNodeAction(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), writeListPage(), and xlogVacuumPage().
void XLogRegisterData | ( | const char * | data, |
uint32 | len | ||
) |
Definition at line 364 of file xloginsert.c.
References Assert, begininsert_called, XLogRecData::data, data, ereport, errdetail_internal(), errmsg_internal(), ERROR, XLogRecData::len, len, mainrdata_last, mainrdata_len, max_rdatas, XLogRecData::next, num_rdatas, and rdatas.
Referenced by _bt_allocbuf(), _bt_dedup_pass(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_mark_page_halfdead(), _bt_newlevel(), _bt_split(), _bt_unlink_halfdead_page(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_init(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), AssignTransactionId(), brin_doinsert(), brin_doupdate(), brinbuild(), brinRevmapDesummarizeRange(), CreateCheckPoint(), CreateDatabaseUsingFileCopy(), CreateDirAndVersionFile(), CreateEndOfRecoveryRecord(), CreateOverwriteContrecordRecord(), createPostingTree(), CreateTableSpace(), do_pg_backup_stop(), do_setval(), doPickSplit(), DropTableSpace(), EndPrepare(), ExecuteTruncateGuts(), fill_seq_fork_with_data(), ginDeletePage(), ginHeapTupleFastInsert(), ginPlaceToPage(), ginUpdateStats(), gistXLogAssignLSN(), gistXLogDelete(), gistXLogPageDelete(), gistXLogPageReuse(), gistXLogSplit(), gistXLogUpdate(), hashbucketcleanup(), hashbulkdelete(), heap_abort_speculative(), heap_delete(), heap_finish_speculative(), heap_inplace_update_and_unlock(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_update(), log_heap_new_cid(), log_heap_prune_and_freeze(), log_heap_update(), log_heap_visible(), log_smgrcreate(), LogAccessExclusiveLocks(), LogCurrentRunningXacts(), logical_heap_rewrite_flush_mappings(), LogLogicalInvalidations(), LogLogicalMessage(), LogStandbyInvalidations(), movedb(), moveLeafs(), MultiXactIdCreateFromMembers(), nextval_internal(), pg_truncate_visibility_map(), RelationTruncate(), remove_dbtablespaces(), replorigin_advance(), replorigin_state_clear(), revmap_physical_extend(), shiftList(), spgAddNodeAction(), spgSplitNodeAction(), test_custom_rmgrs_insert_wal_record(), UpdateFullPageWrites(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), write_relmap_file(), writeListPage(), WriteMTruncateXlogRec(), WriteMZeroPageXlogRec(), WriteTruncateXlogRec(), WriteZeroPageXlogRec(), XactLogAbortRecord(), XactLogCommitRecord(), XLogPutNextOid(), XLogReportParameters(), and XLogRestorePoint().
void XLogResetInsertion | ( | void | ) |
Definition at line 222 of file xloginsert.c.
References begininsert_called, curinsert_flags, i, mainrdata_head, mainrdata_last, mainrdata_len, max_registered_block_id, num_rdatas, and registered_buffers.
Referenced by AbortSubTransaction(), AbortTransaction(), and XLogInsert().
XLogRecPtr XLogSaveBufferForHint | ( | Buffer | buffer, |
bool | buffer_std | ||
) |
Definition at line 1065 of file xloginsert.c.
References Assert, BufferGetBlock(), BufferGetLSNAtomic(), BufferGetPage(), BufferGetTag(), PGAlignedBlock::data, DELAY_CHKPT_START, PGPROC::delayChkptFlags, GetRedoRecPtr(), InvalidXLogRecPtr, lower(), MyProc, RedoRecPtr, REGBUF_STANDARD, upper(), XLOG_FPI_FOR_HINT, XLogBeginInsert(), XLogInsert(), and XLogRegisterBlock().
Referenced by MarkBufferDirtyHint().
void XLogSetRecordFlags | ( | uint8 | flags | ) |
Definition at line 456 of file xloginsert.c.
References Assert, begininsert_called, and curinsert_flags.
Referenced by EndPrepare(), ExecuteTruncateGuts(), gistXLogAssignLSN(), heap_delete(), heap_finish_speculative(), heap_insert(), heap_multi_insert(), log_heap_update(), LogAccessExclusiveLocks(), LogCurrentRunningXacts(), LogLogicalMessage(), RequestXLogSwitch(), test_custom_rmgrs_insert_wal_record(), XactLogAbortRecord(), and XactLogCommitRecord().
|
static |
Definition at line 132 of file xloginsert.c.
Referenced by XLogBeginInsert(), XLogInsert(), XLogRegisterBlock(), XLogRegisterBufData(), XLogRegisterBuffer(), XLogRegisterData(), XLogResetInsertion(), and XLogSetRecordFlags().
|
static |
Definition at line 103 of file xloginsert.c.
Referenced by XLogInsert(), XLogRecordAssemble(), XLogResetInsertion(), and XLogSetRecordFlags().
|
static |
Definition at line 113 of file xloginsert.c.
Referenced by XLogRecordAssemble().
|
static |
Definition at line 114 of file xloginsert.c.
Referenced by InitXLogInsert(), and XLogRecordAssemble().
|
static |
Definition at line 98 of file xloginsert.c.
Referenced by XLogBeginInsert(), XLogRecordAssemble(), and XLogResetInsertion().
|
static |
Definition at line 99 of file xloginsert.c.
Referenced by XLogBeginInsert(), XLogRecordAssemble(), XLogRegisterData(), and XLogResetInsertion().
|
static |
Definition at line 100 of file xloginsert.c.
Referenced by XLogBeginInsert(), XLogRecordAssemble(), XLogRegisterData(), and XLogResetInsertion().
|
static |
Definition at line 130 of file xloginsert.c.
Referenced by InitXLogInsert(), XLogEnsureRecordSpace(), XLogRegisterBufData(), and XLogRegisterData().
|
static |
Definition at line 91 of file xloginsert.c.
Referenced by XLogBeginInsert(), XLogRecordAssemble(), XLogRegisterBlock(), XLogRegisterBuffer(), and XLogResetInsertion().
|
static |
Definition at line 90 of file xloginsert.c.
Referenced by InitXLogInsert(), XLogEnsureRecordSpace(), XLogRegisterBlock(), and XLogRegisterBuffer().
|
static |
Definition at line 129 of file xloginsert.c.
Referenced by XLogRegisterBufData(), XLogRegisterData(), and XLogResetInsertion().
|
static |
Definition at line 128 of file xloginsert.c.
Referenced by InitXLogInsert(), XLogEnsureRecordSpace(), XLogRegisterBufData(), and XLogRegisterData().
|
static |
Definition at line 89 of file xloginsert.c.
Referenced by InitXLogInsert(), XLogEnsureRecordSpace(), XLogRecordAssemble(), XLogRegisterBlock(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogResetInsertion().
|
static |
Definition at line 135 of file xloginsert.c.
Referenced by InitXLogInsert().