PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/bufmask.h"
#include "access/hash.h"
#include "access/hash_xlog.h"
#include "access/xlogutils.h"
#include "storage/standby.h"
Go to the source code of this file.
Functions | |
static void | hash_xlog_init_meta_page (XLogReaderState *record) |
static void | hash_xlog_init_bitmap_page (XLogReaderState *record) |
static void | hash_xlog_insert (XLogReaderState *record) |
static void | hash_xlog_add_ovfl_page (XLogReaderState *record) |
static void | hash_xlog_split_allocate_page (XLogReaderState *record) |
static void | hash_xlog_split_page (XLogReaderState *record) |
static void | hash_xlog_split_complete (XLogReaderState *record) |
static void | hash_xlog_move_page_contents (XLogReaderState *record) |
static void | hash_xlog_squeeze_page (XLogReaderState *record) |
static void | hash_xlog_delete (XLogReaderState *record) |
static void | hash_xlog_split_cleanup (XLogReaderState *record) |
static void | hash_xlog_update_meta_page (XLogReaderState *record) |
static void | hash_xlog_vacuum_one_page (XLogReaderState *record) |
void | hash_redo (XLogReaderState *record) |
void | hash_mask (char *pagedata, BlockNumber blkno) |
void hash_mask | ( | char * | pagedata, |
BlockNumber | blkno | ||
) |
Definition at line 1121 of file hash_xlog.c.
References HashPageOpaqueData::hasho_flag, HashPageGetOpaque, LH_BUCKET_PAGE, LH_OVERFLOW_PAGE, LH_PAGE_HAS_DEAD_TUPLES, LH_PAGE_TYPE, LH_UNUSED_PAGE, mask_lp_flags(), mask_page_content(), mask_page_hint_bits(), mask_page_lsn_and_checksum(), and mask_unused_space().
void hash_redo | ( | XLogReaderState * | record | ) |
Definition at line 1067 of file hash_xlog.c.
References elog, hash_xlog_add_ovfl_page(), hash_xlog_delete(), hash_xlog_init_bitmap_page(), hash_xlog_init_meta_page(), hash_xlog_insert(), hash_xlog_move_page_contents(), hash_xlog_split_allocate_page(), hash_xlog_split_cleanup(), hash_xlog_split_complete(), hash_xlog_split_page(), hash_xlog_squeeze_page(), hash_xlog_update_meta_page(), hash_xlog_vacuum_one_page(), PANIC, XLOG_HASH_ADD_OVFL_PAGE, XLOG_HASH_DELETE, XLOG_HASH_INIT_BITMAP_PAGE, XLOG_HASH_INIT_META_PAGE, XLOG_HASH_INSERT, XLOG_HASH_MOVE_PAGE_CONTENTS, XLOG_HASH_SPLIT_ALLOCATE_PAGE, XLOG_HASH_SPLIT_CLEANUP, XLOG_HASH_SPLIT_COMPLETE, XLOG_HASH_SPLIT_PAGE, XLOG_HASH_SQUEEZE_PAGE, XLOG_HASH_UPDATE_META_PAGE, XLOG_HASH_VACUUM_ONE_PAGE, XLogRecGetInfo, and XLR_INFO_MASK.
|
static |
Definition at line 173 of file hash_xlog.c.
References _hash_initbitmapbuffer(), _hash_initbuf(), Assert, BLK_NEEDS_REDO, BlockNumberIsValid(), xl_hash_add_ovfl_page::bmpage_found, xl_hash_add_ovfl_page::bmsize, BufferGetBlockNumber(), BufferGetPage(), BufferIsValid(), data, XLogReaderState::EndRecPtr, HashMetaPageData::hashm_firstfree, HashMetaPageData::hashm_mapp, HashMetaPageData::hashm_nmaps, HashMetaPageData::hashm_ovflpoint, HashMetaPageData::hashm_spares, HashPageOpaqueData::hasho_nextblkno, HashPageOpaqueData::hasho_prevblkno, HashPageGetBitmap, HashPageGetMeta, HashPageGetOpaque, InvalidBlockNumber, LH_OVERFLOW_PAGE, MarkBufferDirty(), PageSetLSN(), PG_USED_FOR_ASSERTS_ONLY, SETBIT, UnlockReleaseBuffer(), XLogInitBufferForRedo(), XLogReadBufferForRedo(), XLogRecGetBlockData(), XLogRecGetBlockTag(), XLogRecGetData, and XLogRecHasBlockRef.
Referenced by hash_redo().
|
static |
Definition at line 861 of file hash_xlog.c.
References generate_unaccent_rules::action, BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), xl_hash_delete::clear_dead_marking, XLogReaderState::EndRecPtr, HashPageOpaqueData::hasho_flag, HashPageGetOpaque, InvalidBuffer, xl_hash_delete::is_primary_bucket_page, len, LH_PAGE_HAS_DEAD_TUPLES, MarkBufferDirty(), PageIndexMultiDelete(), PageSetLSN(), RBM_NORMAL, UnlockReleaseBuffer(), XLogReadBufferForRedo(), XLogReadBufferForRedoExtended(), XLogRecGetBlockData(), and XLogRecGetData.
Referenced by hash_redo().
|
static |
Definition at line 63 of file hash_xlog.c.
References _hash_initbitmapbuffer(), BLK_NEEDS_REDO, xl_hash_init_bitmap_page::bmsize, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, FlushOneBuffer(), HashMetaPageData::hashm_mapp, HashMetaPageData::hashm_maxbucket, HashMetaPageData::hashm_nmaps, HashPageGetMeta, INIT_FORKNUM, MarkBufferDirty(), PageSetLSN(), UnlockReleaseBuffer(), XLogInitBufferForRedo(), XLogReadBufferForRedo(), XLogRecGetBlockTag(), and XLogRecGetData.
Referenced by hash_redo().
|
static |
Definition at line 27 of file hash_xlog.c.
References _hash_init_metabuffer(), Assert, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, xl_hash_init_meta_page::ffactor, FlushOneBuffer(), INIT_FORKNUM, MarkBufferDirty(), xl_hash_init_meta_page::num_tuples, PageSetLSN(), xl_hash_init_meta_page::procid, UnlockReleaseBuffer(), XLogInitBufferForRedo(), XLogRecGetBlockTag(), and XLogRecGetData.
Referenced by hash_redo().
|
static |
Definition at line 125 of file hash_xlog.c.
References BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), elog, XLogReaderState::EndRecPtr, HashMetaPageData::hashm_ntuples, HashPageGetMeta, InvalidOffsetNumber, MarkBufferDirty(), xl_hash_insert::offnum, PageAddItem, PageSetLSN(), PANIC, UnlockReleaseBuffer(), XLogReadBufferForRedo(), XLogRecGetBlockData(), and XLogRecGetData.
Referenced by hash_redo().
|
static |
Definition at line 501 of file hash_xlog.c.
References generate_unaccent_rules::action, Assert, BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), data, elog, XLogReaderState::EndRecPtr, ERROR, IndexTupleSize, InvalidBuffer, InvalidOffsetNumber, xl_hash_move_page_contents::is_prim_bucket_same_wrt, len, MarkBufferDirty(), MAXALIGN, xl_hash_move_page_contents::ntups, PageAddItem, PageIndexMultiDelete(), PageSetLSN(), RBM_NORMAL, UnlockReleaseBuffer(), while(), XLogReadBufferForRedo(), XLogReadBufferForRedoExtended(), XLogRecGetBlockData(), and XLogRecGetData.
Referenced by hash_redo().
|
static |
Definition at line 311 of file hash_xlog.c.
References _hash_initbuf(), generate_unaccent_rules::action, BLK_NEEDS_REDO, BLK_RESTORED, BufferGetPage(), BufferIsValid(), data, XLogReaderState::EndRecPtr, xl_hash_split_allocate_page::flags, HashMetaPageData::hashm_highmask, HashMetaPageData::hashm_lowmask, HashMetaPageData::hashm_maxbucket, HashMetaPageData::hashm_ovflpoint, HashMetaPageData::hashm_spares, HashPageOpaqueData::hasho_flag, HashPageOpaqueData::hasho_prevblkno, HashPageGetMeta, HashPageGetOpaque, MarkBufferDirty(), xl_hash_split_allocate_page::new_bucket, xl_hash_split_allocate_page::new_bucket_flag, xl_hash_split_allocate_page::old_bucket_flag, PageSetLSN(), PG_USED_FOR_ASSERTS_ONLY, RBM_NORMAL, RBM_ZERO_AND_CLEANUP_LOCK, UnlockReleaseBuffer(), XLH_SPLIT_META_UPDATE_MASKS, XLH_SPLIT_META_UPDATE_SPLITPOINT, XLogReadBufferForRedo(), XLogReadBufferForRedoExtended(), XLogRecGetBlockData(), and XLogRecGetData.
Referenced by hash_redo().
|
static |
Definition at line 939 of file hash_xlog.c.
References BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, HashPageOpaqueData::hasho_flag, HashPageGetOpaque, LH_BUCKET_NEEDS_SPLIT_CLEANUP, MarkBufferDirty(), PageSetLSN(), UnlockReleaseBuffer(), and XLogReadBufferForRedo().
Referenced by hash_redo().
|
static |
Definition at line 442 of file hash_xlog.c.
References generate_unaccent_rules::action, BLK_NEEDS_REDO, BLK_RESTORED, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, HashPageOpaqueData::hasho_flag, HashPageGetOpaque, MarkBufferDirty(), xl_hash_split_complete::new_bucket_flag, xl_hash_split_complete::old_bucket_flag, PageSetLSN(), UnlockReleaseBuffer(), XLogReadBufferForRedo(), and XLogRecGetData.
Referenced by hash_redo().
|
static |
Definition at line 428 of file hash_xlog.c.
References BLK_RESTORED, buf, elog, ERROR, UnlockReleaseBuffer(), and XLogReadBufferForRedo().
Referenced by hash_redo().
|
static |
Definition at line 627 of file hash_xlog.c.
References _hash_pageinit(), generate_unaccent_rules::action, Assert, BLK_NEEDS_REDO, BLK_NOTFOUND, BufferGetPage(), BufferGetPageSize(), BufferIsValid(), CLRBIT, data, elog, XLogReaderState::EndRecPtr, ERROR, HashMetaPageData::hashm_firstfree, HashPageOpaqueData::hasho_bucket, HashPageOpaqueData::hasho_flag, HashPageOpaqueData::hasho_nextblkno, HashPageOpaqueData::hasho_page_id, HASHO_PAGE_ID, HashPageOpaqueData::hasho_prevblkno, HashPageGetBitmap, HashPageGetMeta, HashPageGetOpaque, IndexTupleSize, InvalidBlockNumber, InvalidBucket, InvalidBuffer, InvalidOffsetNumber, xl_hash_squeeze_page::is_prev_bucket_same_wrt, xl_hash_squeeze_page::is_prim_bucket_same_wrt, LH_UNUSED_PAGE, MarkBufferDirty(), MAXALIGN, xl_hash_squeeze_page::nextblkno, xl_hash_squeeze_page::ntups, PageAddItem, PageSetLSN(), xl_hash_squeeze_page::prevblkno, RBM_NORMAL, UnlockReleaseBuffer(), while(), XLogReadBufferForRedo(), XLogReadBufferForRedoExtended(), XLogRecGetBlockData(), XLogRecGetData, and XLogRecHasBlockRef.
Referenced by hash_redo().
|
static |
Definition at line 964 of file hash_xlog.c.
References BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, HashMetaPageData::hashm_ntuples, HashPageGetMeta, MarkBufferDirty(), xl_hash_update_meta_page::ntuples, PageSetLSN(), UnlockReleaseBuffer(), XLogReadBufferForRedo(), and XLogRecGetData.
Referenced by hash_redo().
|
static |
Definition at line 991 of file hash_xlog.c.
References generate_unaccent_rules::action, BLK_NEEDS_REDO, BufferGetPage(), BufferIsValid(), XLogReaderState::EndRecPtr, HashMetaPageData::hashm_ntuples, HashPageOpaqueData::hasho_flag, HashPageGetMeta, HashPageGetOpaque, InHotStandby, xl_hash_vacuum_one_page::isCatalogRel, LH_PAGE_HAS_DEAD_TUPLES, MarkBufferDirty(), xl_hash_vacuum_one_page::ntuples, xl_hash_vacuum_one_page::offsets, PageIndexMultiDelete(), PageSetLSN(), RBM_NORMAL, ResolveRecoveryConflictWithSnapshot(), xl_hash_vacuum_one_page::snapshotConflictHorizon, UnlockReleaseBuffer(), XLogReadBufferForRedo(), XLogReadBufferForRedoExtended(), XLogRecGetBlockTag(), and XLogRecGetData.
Referenced by hash_redo().