PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/hash.h"
#include "access/hash_xlog.h"
#include "access/xloginsert.h"
#include "miscadmin.h"
#include "storage/predicate.h"
#include "utils/rel.h"
Go to the source code of this file.
Functions | |
static void | _hash_vacuum_one_page (Relation rel, Relation hrel, Buffer metabuf, Buffer buf) |
void | _hash_doinsert (Relation rel, IndexTuple itup, Relation heapRel, bool sorted) |
OffsetNumber | _hash_pgaddtup (Relation rel, Buffer buf, Size itemsize, IndexTuple itup, bool appendtup) |
void | _hash_pgaddmultitup (Relation rel, Buffer buf, IndexTuple *itups, OffsetNumber *itup_offsets, uint16 nitups) |
void _hash_doinsert | ( | Relation | rel, |
IndexTuple | itup, | ||
Relation | heapRel, | ||
bool | sorted | ||
) |
Definition at line 38 of file hashinsert.c.
References _hash_addovflpage(), _hash_dropbuf(), _hash_expandtable(), _hash_finish_split(), _hash_get_indextuple_hashkey(), _hash_getbucketbuf_from_hashkey(), _hash_getbuf(), _hash_pgaddtup(), _hash_relbuf(), _hash_vacuum_one_page(), Assert, BlockNumberIsValid(), buf, BUFFER_LOCK_EXCLUSIVE, BUFFER_LOCK_UNLOCK, BufferGetBlockNumber(), BufferGetPage(), CheckForSerializableConflictIn(), END_CRIT_SECTION, ereport, errcode(), errhint(), errmsg(), ERROR, H_BUCKET_BEING_SPLIT, H_HAS_DEAD_TUPLES, HASH_METAPAGE, HASH_NOLOCK, HASH_WRITE, HashMetaPageData::hashm_ffactor, HashMetaPageData::hashm_highmask, HashMetaPageData::hashm_lowmask, HashMetaPageData::hashm_maxbucket, HashMetaPageData::hashm_ntuples, HashMaxItemSize, HashPageOpaqueData::hasho_bucket, HashPageOpaqueData::hasho_flag, HashPageOpaqueData::hasho_nextblkno, HashPageGetMeta, HashPageGetOpaque, IndexTupleSize, InvalidBuffer, IsBufferCleanupOK(), LH_META_PAGE, LH_OVERFLOW_PAGE, LH_PAGE_TYPE, LockBuffer(), MarkBufferDirty(), MAXALIGN, xl_hash_insert::offnum, PageGetFreeSpace(), PageSetLSN(), REGBUF_STANDARD, RelationNeedsWAL, SizeOfHashInsert, START_CRIT_SECTION, XLOG_HASH_INSERT, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by _h_indexbuild(), hashbuildCallback(), and hashinsert().
void _hash_pgaddmultitup | ( | Relation | rel, |
Buffer | buf, | ||
IndexTuple * | itups, | ||
OffsetNumber * | itup_offsets, | ||
uint16 | nitups | ||
) |
Definition at line 331 of file hashinsert.c.
References _hash_binsearch(), _hash_checkpage(), _hash_get_indextuple_hashkey(), buf, BufferGetPage(), elog, ERROR, i, IndexTupleSize, InvalidOffsetNumber, LH_BUCKET_PAGE, LH_OVERFLOW_PAGE, MAXALIGN, PageAddItem, and RelationGetRelationName.
Referenced by _hash_freeovflpage(), _hash_splitbucket(), and _hash_squeezebucket().
OffsetNumber _hash_pgaddtup | ( | Relation | rel, |
Buffer | buf, | ||
Size | itemsize, | ||
IndexTuple | itup, | ||
bool | appendtup | ||
) |
Definition at line 274 of file hashinsert.c.
References _hash_binsearch(), _hash_checkpage(), _hash_get_indextuple_hashkey(), Assert, buf, BufferGetPage(), elog, ERROR, InvalidOffsetNumber, LH_BUCKET_PAGE, LH_OVERFLOW_PAGE, PageAddItem, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), and RelationGetRelationName.
Referenced by _hash_doinsert().
|
static |
Definition at line 370 of file hashinsert.c.
References buf, BUFFER_LOCK_EXCLUSIVE, BUFFER_LOCK_UNLOCK, BufferGetPage(), END_CRIT_SECTION, FirstOffsetNumber, HashMetaPageData::hashm_ntuples, HashPageOpaqueData::hasho_flag, HashPageGetMeta, HashPageGetOpaque, index_compute_xid_horizon_for_tuples(), xl_hash_vacuum_one_page::isCatalogRel, ItemIdIsDead, LH_PAGE_HAS_DEAD_TUPLES, LockBuffer(), MarkBufferDirty(), MaxOffsetNumber, xl_hash_vacuum_one_page::ntuples, OffsetNumberNext, PageGetItemId(), PageGetMaxOffsetNumber(), PageIndexMultiDelete(), PageSetLSN(), REGBUF_STANDARD, RelationIsAccessibleInLogicalDecoding, RelationNeedsWAL, SizeOfHashVacuumOnePage, xl_hash_vacuum_one_page::snapshotConflictHorizon, START_CRIT_SECTION, XLOG_HASH_VACUUM_ONE_PAGE, XLogBeginInsert(), XLogInsert(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by _hash_doinsert().