58 elog(
ERROR,
"SPGiST tuple to be replaced is not a placeholder");
69 elog(
ERROR,
"failed to add item of size %u to SPGiST index page",
132 (
Item) leafTuple, leafTupleHdr.
size,
134 elog(
ERROR,
"failed to add item of size %u to SPGiST index page",
222 for (
i = 0;
i < nInsert;
i++)
232 memcpy(&leafTupleHdr, leafTuple,
236 leafTupleHdr.
size, toInsert[
i]);
237 ptr += leafTupleHdr.
size;
255 toInsert[nInsert - 1]);
274 blknoDst, toInsert[nInsert - 1]);
314 false,
false) != xldata->
offnum)
315 elog(
ERROR,
"failed to add item of size %u to SPGiST index page",
395 false,
false) != xldata->
offnum)
396 elog(
ERROR,
"failed to add item of size %u to SPGiST index page",
468 ptr += prefixTupleHdr.
size;
513 elog(
ERROR,
"failed to add item of size %u to SPGiST index page",
514 prefixTupleHdr.
size);
518 postfixTupleHdr.
size,
539 uint8 *leafPageSelect;
559 leafPageSelect = (
uint8 *) ptr;
565 ptr += innerTupleHdr.
size;
659 ptr += leafTupleHdr.
size;
661 page = leafPageSelect[
i] ? destPage : srcPage;
675 if (destPage != NULL)
787 toDead, xldata->
nDead,
811 moveSrc, xldata->
nMove,
868 itemToPlaceholder = xldata->
offsets;
968 elog(
PANIC,
"spg_redo: unknown op code %u", info);
979 "SP-GiST temporary context",
#define InvalidBlockNumber
void mask_page_lsn_and_checksum(Page page)
void mask_unused_space(Page page)
void mask_page_hint_bits(Page page)
void UnlockReleaseBuffer(Buffer buffer)
void MarkBufferDirty(Buffer buffer)
static Page BufferGetPage(Buffer buffer)
static bool BufferIsValid(Buffer bufnum)
void PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems)
void PageIndexTupleDelete(Page page, OffsetNumber offnum)
PageHeaderData * PageHeader
static Item PageGetItem(Page page, ItemId itemId)
#define SizeOfPageHeaderData
static ItemId PageGetItemId(Page page, OffsetNumber offsetNumber)
static void PageSetLSN(Page page, XLogRecPtr lsn)
static OffsetNumber PageGetMaxOffsetNumber(Page page)
#define PageAddItem(page, item, size, offsetNumber, overwrite, is_heap)
#define Assert(condition)
static void ItemPointerSetInvalid(ItemPointerData *pointer)
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext CurrentMemoryContext
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define InvalidOffsetNumber
MemoryContextSwitchTo(old_ctx)
static pg_noinline void Size size
void spgPageIndexMultiDelete(SpGistState *state, Page page, OffsetNumber *itemnos, int nitems, int firststate, int reststate, BlockNumber blkno, OffsetNumber offnum)
void spgUpdateNodeLink(SpGistInnerTuple tup, int nodeN, BlockNumber blkno, OffsetNumber offset)
SpGistDeadTupleData * SpGistDeadTuple
SpGistInnerTupleData * SpGistInnerTuple
#define SGLT_GET_NEXTOFFSET(spgLeafTuple)
#define SPGIST_PLACEHOLDER
#define SGLT_SET_NEXTOFFSET(spgLeafTuple, offsetNumber)
struct SpGistLeafTupleData * SpGistLeafTuple
#define SpGistPageGetOpaque(page)
SpGistDeadTuple spgFormDeadTuple(SpGistState *state, int tupstate, BlockNumber blkno, OffsetNumber offnum)
void SpGistInitBuffer(Buffer b, uint16 f)
static void addOrReplaceTuple(Page page, Item tuple, int size, OffsetNumber offset)
void spg_redo(XLogReaderState *record)
static void spgRedoVacuumRoot(XLogReaderState *record)
static void spgRedoSplitTuple(XLogReaderState *record)
static void spgRedoVacuumRedirect(XLogReaderState *record)
void spg_xlog_cleanup(void)
void spg_mask(char *pagedata, BlockNumber blkno)
static void spgRedoMoveLeafs(XLogReaderState *record)
static void fillFakeState(SpGistState *state, spgxlogState stateSrc)
void spg_xlog_startup(void)
static void spgRedoAddNode(XLogReaderState *record)
static MemoryContext opCtx
static void spgRedoVacuumLeaf(XLogReaderState *record)
static void spgRedoPickSplit(XLogReaderState *record)
static void spgRedoAddLeaf(XLogReaderState *record)
struct spgxlogSplitTuple spgxlogSplitTuple
#define XLOG_SPGIST_SPLIT_TUPLE
#define SizeOfSpgxlogPickSplit
#define XLOG_SPGIST_VACUUM_ROOT
struct spgxlogAddLeaf spgxlogAddLeaf
#define SizeOfSpgxlogVacuumLeaf
#define SizeOfSpgxlogMoveLeafs
#define XLOG_SPGIST_VACUUM_LEAF
#define XLOG_SPGIST_ADD_NODE
#define XLOG_SPGIST_ADD_LEAF
struct spgxlogAddNode spgxlogAddNode
#define XLOG_SPGIST_MOVE_LEAFS
#define XLOG_SPGIST_PICKSPLIT
#define XLOG_SPGIST_VACUUM_REDIRECT
void ResolveRecoveryConflictWithSnapshot(TransactionId snapshotConflictHorizon, bool isCatalogRel, RelFileLocator locator)
OffsetNumber offnumHeadLeaf
OffsetNumber offnumParent
OffsetNumber offnumParent
OffsetNumber offnumParent
OffsetNumber offnumParent
OffsetNumber offnumPostfix
OffsetNumber offnumPrefix
TransactionId redirectXid
OffsetNumber firstPlaceholder
TransactionId snapshotConflictHorizon
OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]
OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]
void XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id, RelFileLocator *rlocator, ForkNumber *forknum, BlockNumber *blknum)
#define XLogRecGetInfo(decoder)
#define XLogRecGetData(decoder)
#define XLogRecHasBlockRef(decoder, block_id)
XLogRedoAction XLogReadBufferForRedo(XLogReaderState *record, uint8 block_id, Buffer *buf)
Buffer XLogInitBufferForRedo(XLogReaderState *record, uint8 block_id)