PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/bufmask.h"
#include "access/spgist_private.h"
#include "access/spgxlog.h"
#include "access/xlogutils.h"
#include "storage/standby.h"
#include "utils/memutils.h"
Go to the source code of this file.
Functions | |
static void | fillFakeState (SpGistState *state, spgxlogState stateSrc) |
static void | addOrReplaceTuple (Page page, Item tuple, int size, OffsetNumber offset) |
static void | spgRedoAddLeaf (XLogReaderState *record) |
static void | spgRedoMoveLeafs (XLogReaderState *record) |
static void | spgRedoAddNode (XLogReaderState *record) |
static void | spgRedoSplitTuple (XLogReaderState *record) |
static void | spgRedoPickSplit (XLogReaderState *record) |
static void | spgRedoVacuumLeaf (XLogReaderState *record) |
static void | spgRedoVacuumRoot (XLogReaderState *record) |
static void | spgRedoVacuumRedirect (XLogReaderState *record) |
void | spg_redo (XLogReaderState *record) |
void | spg_xlog_startup (void) |
void | spg_xlog_cleanup (void) |
void | spg_mask (char *pagedata, BlockNumber blkno) |
Variables | |
static MemoryContext | opCtx |
|
static |
Definition at line 50 of file spgxlog.c.
References Assert, elog, ERROR, PageAddItem, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageIndexTupleDelete(), size, SPGIST_PLACEHOLDER, SpGistPageGetOpaque, and SpGistDeadTupleData::tupstate.
Referenced by spgRedoAddLeaf(), spgRedoAddNode(), spgRedoMoveLeafs(), spgRedoPickSplit(), and spgRedoSplitTuple().
|
static |
Definition at line 35 of file spgxlog.c.
References spgxlogState::isBuild, palloc0(), spgxlogState::redirectXid, and SGDTSIZE.
Referenced by spgRedoAddNode(), spgRedoMoveLeafs(), spgRedoPickSplit(), and spgRedoVacuumLeaf().
void spg_mask | ( | char * | pagedata, |
BlockNumber | blkno | ||
) |
Definition at line 994 of file spgxlog.c.
References mask_page_hint_bits(), mask_page_lsn_and_checksum(), mask_unused_space(), PageHeaderData::pd_lower, and SizeOfPageHeaderData.
void spg_redo | ( | XLogReaderState * | record | ) |
Definition at line 935 of file spgxlog.c.
References elog, MemoryContextReset(), MemoryContextSwitchTo(), opCtx, PANIC, spgRedoAddLeaf(), spgRedoAddNode(), spgRedoMoveLeafs(), spgRedoPickSplit(), spgRedoSplitTuple(), spgRedoVacuumLeaf(), spgRedoVacuumRedirect(), spgRedoVacuumRoot(), XLOG_SPGIST_ADD_LEAF, XLOG_SPGIST_ADD_NODE, XLOG_SPGIST_MOVE_LEAFS, XLOG_SPGIST_PICKSPLIT, XLOG_SPGIST_SPLIT_TUPLE, XLOG_SPGIST_VACUUM_LEAF, XLOG_SPGIST_VACUUM_REDIRECT, XLOG_SPGIST_VACUUM_ROOT, XLogRecGetInfo, and XLR_INFO_MASK.
void spg_xlog_cleanup | ( | void | ) |
void spg_xlog_startup | ( | void | ) |
Definition at line 976 of file spgxlog.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CurrentMemoryContext, and opCtx.
|
static |
Definition at line 74 of file spgxlog.c.
References generate_unaccent_rules::action, addOrReplaceTuple(), Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), elog, XLogReaderState::EndRecPtr, ERROR, InvalidOffsetNumber, MarkBufferDirty(), spgxlogAddLeaf::newPage, spgxlogAddLeaf::nodeI, spgxlogAddLeaf::offnumHeadLeaf, spgxlogAddLeaf::offnumLeaf, spgxlogAddLeaf::offnumParent, PageAddItem, PageGetItem(), PageGetItemId(), PageIndexTupleDelete(), PageSetLSN(), SGLT_GET_NEXTOFFSET, SGLT_SET_NEXTOFFSET, SpGistLeafTupleData::size, SPGIST_LEAF, SPGIST_NULLS, SpGistInitBuffer(), spgUpdateNodeLink(), spgxlogAddLeaf::storesNulls, UnlockReleaseBuffer(), XLogInitBufferForRedo(), XLogReadBufferForRedo(), XLogRecGetBlockTag(), and XLogRecGetData.
Referenced by spg_redo().
|
static |
Definition at line 284 of file spgxlog.c.
References generate_unaccent_rules::action, addOrReplaceTuple(), Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), elog, XLogReaderState::EndRecPtr, ERROR, fillFakeState(), InvalidBlockNumber, InvalidOffsetNumber, MarkBufferDirty(), spgxlogAddNode::newPage, spgxlogAddNode::nodeI, spgxlogAddNode::offnum, spgxlogAddNode::offnumNew, spgxlogAddNode::offnumParent, PageAddItem, PageGetItem(), PageGetItemId(), PageIndexTupleDelete(), PageSetLSN(), spgxlogAddNode::parentBlk, SpGistInnerTupleData::size, SpGistDeadTupleData::size, spgFormDeadTuple(), SPGIST_PLACEHOLDER, SPGIST_REDIRECT, SpGistInitBuffer(), SpGistPageGetOpaque, spgUpdateNodeLink(), spgxlogAddNode::stateSrc, UnlockReleaseBuffer(), XLogInitBufferForRedo(), XLogReadBufferForRedo(), XLogRecGetBlockTag(), XLogRecGetData, and XLogRecHasBlockRef.
Referenced by spg_redo().
|
static |
Definition at line 171 of file spgxlog.c.
References generate_unaccent_rules::action, addOrReplaceTuple(), BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, fillFakeState(), i, MarkBufferDirty(), spgxlogMoveLeafs::newPage, spgxlogMoveLeafs::nMoves, spgxlogMoveLeafs::nodeI, spgxlogMoveLeafs::offnumParent, PageGetItem(), PageGetItemId(), PageSetLSN(), spgxlogMoveLeafs::replaceDead, SpGistLeafTupleData::size, SizeOfSpgxlogMoveLeafs, SPGIST_LEAF, SPGIST_NULLS, SPGIST_PLACEHOLDER, SPGIST_REDIRECT, SpGistInitBuffer(), spgPageIndexMultiDelete(), spgUpdateNodeLink(), spgxlogMoveLeafs::stateSrc, spgxlogMoveLeafs::storesNulls, UnlockReleaseBuffer(), XLogInitBufferForRedo(), XLogReadBufferForRedo(), XLogRecGetBlockTag(), and XLogRecGetData.
Referenced by spg_redo().
|
static |
Definition at line 529 of file spgxlog.c.
References generate_unaccent_rules::action, addOrReplaceTuple(), Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, fillFakeState(), i, spgxlogPickSplit::initDest, spgxlogPickSplit::initInner, spgxlogPickSplit::initSrc, spgxlogPickSplit::innerIsParent, InvalidBlockNumber, InvalidBuffer, InvalidOffsetNumber, spgxlogPickSplit::isRootSplit, MarkBufferDirty(), spgxlogPickSplit::nDelete, spgxlogPickSplit::nInsert, spgxlogPickSplit::nodeI, spgxlogPickSplit::offnumInner, spgxlogPickSplit::offnumParent, PageGetItem(), PageGetItemId(), PageSetLSN(), SpGistInnerTupleData::size, SpGistLeafTupleData::size, SizeOfSpgxlogPickSplit, SPGIST_LEAF, SPGIST_NULLS, SPGIST_PLACEHOLDER, SPGIST_REDIRECT, SpGistInitBuffer(), spgPageIndexMultiDelete(), spgUpdateNodeLink(), spgxlogPickSplit::stateSrc, spgxlogPickSplit::storesNulls, UnlockReleaseBuffer(), XLogInitBufferForRedo(), XLogReadBufferForRedo(), XLogRecGetBlockTag(), XLogRecGetData, and XLogRecHasBlockRef.
Referenced by spg_redo().
|
static |
Definition at line 451 of file spgxlog.c.
References generate_unaccent_rules::action, addOrReplaceTuple(), BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), elog, XLogReaderState::EndRecPtr, ERROR, MarkBufferDirty(), spgxlogSplitTuple::newPage, spgxlogSplitTuple::offnumPostfix, spgxlogSplitTuple::offnumPrefix, PageAddItem, PageIndexTupleDelete(), PageSetLSN(), spgxlogSplitTuple::postfixBlkSame, SpGistInnerTupleData::size, SpGistInitBuffer(), UnlockReleaseBuffer(), XLogInitBufferForRedo(), XLogReadBufferForRedo(), and XLogRecGetData.
Referenced by spg_redo().
|
static |
Definition at line 751 of file spgxlog.c.
References Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, fillFakeState(), i, InvalidBlockNumber, InvalidOffsetNumber, MarkBufferDirty(), spgxlogVacuumLeaf::nChain, spgxlogVacuumLeaf::nDead, spgxlogVacuumLeaf::nMove, spgxlogVacuumLeaf::nPlaceholder, PageGetItem(), PageGetItemId(), PageSetLSN(), SGLT_SET_NEXTOFFSET, SizeOfSpgxlogVacuumLeaf, SPGIST_DEAD, SPGIST_LIVE, SPGIST_PLACEHOLDER, spgPageIndexMultiDelete(), spgxlogVacuumLeaf::stateSrc, SpGistLeafTupleData::tupstate, UnlockReleaseBuffer(), XLogReadBufferForRedo(), and XLogRecGetData.
Referenced by spg_redo().
|
static |
Definition at line 860 of file spgxlog.c.
References Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, spgxlogVacuumRedirect::firstPlaceholder, i, InHotStandby, InvalidOffsetNumber, spgxlogVacuumRedirect::isCatalogRel, ItemPointerSetInvalid(), MarkBufferDirty(), SpGistPageOpaqueData::nPlaceholder, SpGistPageOpaqueData::nRedirection, spgxlogVacuumRedirect::nToPlaceholder, spgxlogVacuumRedirect::offsets, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageIndexMultiDelete(), PageSetLSN(), palloc(), pfree(), SpGistDeadTupleData::pointer, ResolveRecoveryConflictWithSnapshot(), spgxlogVacuumRedirect::snapshotConflictHorizon, SPGIST_PLACEHOLDER, SPGIST_REDIRECT, SpGistPageGetOpaque, SpGistDeadTupleData::tupstate, UnlockReleaseBuffer(), XLogReadBufferForRedo(), XLogRecGetBlockTag(), and XLogRecGetData.
Referenced by spg_redo().
|
static |
Definition at line 834 of file spgxlog.c.
References BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, MarkBufferDirty(), spgxlogVacuumRoot::nDelete, spgxlogVacuumRoot::offsets, PageIndexMultiDelete(), PageSetLSN(), UnlockReleaseBuffer(), XLogReadBufferForRedo(), and XLogRecGetData.
Referenced by spg_redo().
|
static |
Definition at line 25 of file spgxlog.c.
Referenced by spg_redo(), spg_xlog_cleanup(), and spg_xlog_startup().