55 bool end_of_scan =
false;
137 bool block_found =
false;
139 blkno = (*opaquep)->hasho_nextblkno;
205 blkno = (*opaquep)->hasho_prevblkno;
310 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
311 errmsg(
"hash indexes do not support whole-index scans")));
351 bucket = opaque->hasho_bucket;
396 Assert(opaque->hasho_bucket == bucket);
495 prev_blkno = opaque->hasho_prevblkno;
548 next_blkno = opaque->hasho_nextblkno;
617 while (offnum <= maxoff)
#define InvalidBlockNumber
static bool BlockNumberIsValid(BlockNumber blockNumber)
#define BufferIsInvalid(buffer)
BlockNumber BufferGetBlockNumber(Buffer buffer)
void LockBuffer(Buffer buffer, int mode)
#define BUFFER_LOCK_UNLOCK
#define BUFFER_LOCK_SHARE
static Page BufferGetPage(Buffer buffer)
static bool BufferIsValid(Buffer bufnum)
static Item PageGetItem(Page page, ItemId itemId)
static ItemId PageGetItemId(Page page, OffsetNumber offsetNumber)
static OffsetNumber PageGetMaxOffsetNumber(Page page)
#define Assert(condition)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define HashPageGetOpaque(page)
#define HashScanPosInvalidate(scanpos)
#define H_BUCKET_BEING_POPULATED(opaque)
#define INDEX_MOVED_BY_SPLIT_MASK
HashScanOpaqueData * HashScanOpaque
void _hash_relbuf(Relation rel, Buffer buf)
void _hash_dropbuf(Relation rel, Buffer buf)
void _hash_dropscanbuf(Relation rel, HashScanOpaque so)
Buffer _hash_getbuf(Relation rel, BlockNumber blkno, int access, int flags)
Buffer _hash_getbucketbuf_from_hashkey(Relation rel, uint32 hashkey, int access, HashMetaPage *cachedmetap)
bool _hash_first(IndexScanDesc scan, ScanDirection dir)
static void _hash_saveitem(HashScanOpaque so, int itemIndex, OffsetNumber offnum, IndexTuple itup)
static void _hash_readnext(IndexScanDesc scan, Buffer *bufp, Page *pagep, HashPageOpaque *opaquep)
bool _hash_next(IndexScanDesc scan, ScanDirection dir)
static bool _hash_readpage(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
static void _hash_readprev(IndexScanDesc scan, Buffer *bufp, Page *pagep, HashPageOpaque *opaquep)
static int _hash_load_qualified_items(IndexScanDesc scan, Page page, OffsetNumber offnum, ScanDirection dir)
uint32 _hash_get_indextuple_hashkey(IndexTuple itup)
bool _hash_checkqual(IndexScanDesc scan, IndexTuple itup)
OffsetNumber _hash_binsearch(Page page, uint32 hash_value)
uint32 _hash_datum2hashkey(Relation rel, Datum key)
OffsetNumber _hash_binsearch_last(Page page, uint32 hash_value)
void _hash_checkpage(Relation rel, Buffer buf, int flags)
BlockNumber _hash_get_oldblock_from_newbucket(Relation rel, Bucket new_bucket)
uint32 _hash_datum2hashkey_type(Relation rel, Datum key, Oid keytype)
void _hash_kill_items(IndexScanDesc scan)
if(TABLE==NULL||TABLE_index==NULL)
#define ItemIdIsDead(itemId)
IndexTupleData * IndexTuple
#define MaxIndexTuplesPerPage
#define CHECK_FOR_INTERRUPTS()
#define OffsetNumberNext(offsetNumber)
#define FirstOffsetNumber
#define OffsetNumberPrev(offsetNumber)
#define pgstat_count_index_scan(rel)
void PredicateLockPage(Relation relation, BlockNumber blkno, Snapshot snapshot)
#define ScanDirectionIsForward(direction)
#define ScanDirectionIsBackward(direction)
#define HTEqualStrategyNumber
bool hashso_buc_populated
Buffer hashso_split_bucket_buf
HashScanPosItem items[MaxIndexTuplesPerPage]
struct ScanKeyData * keyData
bool ignore_killed_tuples
ItemPointerData xs_heaptid
struct SnapshotData * xs_snapshot