|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/parallel.h"#include "access/slru.h"#include "access/transam.h"#include "access/twophase.h"#include "access/twophase_rmgr.h"#include "access/xact.h"#include "access/xlog.h"#include "miscadmin.h"#include "pgstat.h"#include "port/pg_lfind.h"#include "storage/predicate.h"#include "storage/predicate_internals.h"#include "storage/proc.h"#include "storage/procarray.h"#include "utils/guc_hooks.h"#include "utils/rel.h"#include "utils/snapmgr.h"#include "utils/wait_event.h"
Go to the source code of this file.
Data Structures | |
| struct | SerialControlData |
Typedefs | |
| typedef struct SerialControlData | SerialControlData |
| typedef struct SerialControlData * | SerialControl |
| #define NPREDICATELOCKTARGETENTS | ( | ) | mul_size(max_predicate_locks_per_xact, add_size(MaxBackends, max_prepared_xacts)) |
Definition at line 265 of file predicate.c.
| #define PredicateLockHashCodeFromTargetHashCode | ( | predicatelocktag, | |
| targethash | |||
| ) |
Definition at line 317 of file predicate.c.
| #define PredicateLockHashPartition | ( | hashcode | ) | ((hashcode) % NUM_PREDICATELOCK_PARTITIONS) |
Definition at line 257 of file predicate.c.
| #define PredicateLockHashPartitionLock | ( | hashcode | ) |
Definition at line 259 of file predicate.c.
| #define PredicateLockHashPartitionLockByIndex | ( | i | ) | (&MainLWLockArray[PREDICATELOCK_MANAGER_LWLOCK_OFFSET + (i)].lock) |
Definition at line 262 of file predicate.c.
| #define PredicateLockTargetTagHashCode | ( | predicatelocktargettag | ) | get_hash_value(PredicateLockTargetHash, predicatelocktargettag) |
Definition at line 304 of file predicate.c.
| #define SERIAL_ENTRIESPERPAGE (SERIAL_PAGESIZE / SERIAL_ENTRYSIZE) |
Definition at line 331 of file predicate.c.
| #define SERIAL_ENTRYSIZE sizeof(SerCommitSeqNo) |
Definition at line 330 of file predicate.c.
| #define SERIAL_MAX_PAGE (MaxTransactionId / SERIAL_ENTRIESPERPAGE) |
Definition at line 336 of file predicate.c.
Definition at line 329 of file predicate.c.
| #define SerialNextPage | ( | page | ) | (((page) >= SERIAL_MAX_PAGE) ? 0 : (page) + 1) |
Definition at line 338 of file predicate.c.
| #define SerialPage | ( | xid | ) | (((uint32) (xid)) / SERIAL_ENTRIESPERPAGE) |
Definition at line 344 of file predicate.c.
| #define SerialSlruCtl (&SerialSlruCtlData) |
Definition at line 327 of file predicate.c.
Definition at line 340 of file predicate.c.
| #define SxactHasConflictOut | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_CONFLICT_OUT) != 0) |
Definition at line 290 of file predicate.c.
| #define SxactHasSummaryConflictIn | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_SUMMARY_CONFLICT_IN) != 0) |
Definition at line 283 of file predicate.c.
| #define SxactHasSummaryConflictOut | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_SUMMARY_CONFLICT_OUT) != 0) |
Definition at line 284 of file predicate.c.
| #define SxactIsCommitted | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_COMMITTED) != 0) |
Definition at line 278 of file predicate.c.
| #define SxactIsDeferrableWaiting | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_DEFERRABLE_WAITING) != 0) |
Definition at line 291 of file predicate.c.
| #define SxactIsDoomed | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_DOOMED) != 0) |
Definition at line 281 of file predicate.c.
| #define SxactIsOnFinishedList | ( | sxact | ) | (!dlist_node_is_detached(&(sxact)->finishedLink)) |
Definition at line 268 of file predicate.c.
| #define SxactIsPartiallyReleased | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_PARTIALLY_RELEASED) != 0) |
Definition at line 294 of file predicate.c.
| #define SxactIsPrepared | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_PREPARED) != 0) |
Definition at line 279 of file predicate.c.
| #define SxactIsReadOnly | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_READ_ONLY) != 0) |
Definition at line 282 of file predicate.c.
| #define SxactIsRolledBack | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_ROLLED_BACK) != 0) |
Definition at line 280 of file predicate.c.
| #define SxactIsROSafe | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_RO_SAFE) != 0) |
Definition at line 292 of file predicate.c.
| #define SxactIsROUnsafe | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_RO_UNSAFE) != 0) |
Definition at line 293 of file predicate.c.
| #define TargetTagIsCoveredBy | ( | covered_target, | |
| covering_target | |||
| ) |
Definition at line 234 of file predicate.c.
| typedef struct SerialControlData* SerialControl |
Definition at line 353 of file predicate.c.
Definition at line 4799 of file predicate.c.
References Assert, dlist_iter::cur, TwoPhasePredicateRecord::data, dlist_container, dlist_foreach, fb(), SERIALIZABLEXACT::flags, TwoPhasePredicateXactRecord::flags, InvalidSerializableXact, IsParallelWorker, TwoPhasePredicateRecord::lockRecord, LW_SHARED, LWLockAcquire(), LWLockRelease(), MySerializableXact, ParallelContextActive(), RegisterTwoPhaseRecord(), TwoPhasePredicateLockRecord::target, TWOPHASE_RM_PREDICATELOCK_ID, TWOPHASEPREDICATERECORD_LOCK, TWOPHASEPREDICATERECORD_XACT, TwoPhasePredicateRecord::type, TwoPhasePredicateRecord::xactRecord, SERIALIZABLEXACT::xmin, and TwoPhasePredicateXactRecord::xmin.
Referenced by PrepareTransaction().
| void AttachSerializableXact | ( | SerializableXactHandle | handle | ) |
Definition at line 5065 of file predicate.c.
References Assert, CreateLocalPredicateLockHash(), InvalidSerializableXact, and MySerializableXact.
Referenced by ParallelWorkerMain().
Definition at line 858 of file predicate.c.
References check_slru_buffers(), and newval.
|
static |
Definition at line 2335 of file predicate.c.
References fb(), GetParentPredicateLockTag(), HASH_ENTER, hash_search(), LOCALPREDICATELOCK::held, LocalPredicateLockHash, MaxPredicateChildLocks(), and PredicateLockAcquire().
Referenced by PredicateLockAcquire().
| void CheckForSerializableConflictIn | ( | Relation | relation, |
| const ItemPointerData * | tid, | ||
| BlockNumber | blkno | ||
| ) |
Definition at line 4345 of file predicate.c.
References CheckTargetForConflictsIn(), RelFileLocator::dbOid, ereport, errcode(), ERRCODE_T_R_SERIALIZATION_FAILURE, errdetail_internal(), errhint(), errmsg, ERROR, fb(), InvalidBlockNumber, ItemPointerGetBlockNumber(), ItemPointerGetOffsetNumber(), MySerializableXact, MyXactDidWrite, RelationData::rd_id, RelationData::rd_locator, SerializationNeededForWrite(), SET_PREDICATELOCKTARGETTAG_PAGE, SET_PREDICATELOCKTARGETTAG_RELATION, SET_PREDICATELOCKTARGETTAG_TUPLE, and SxactIsDoomed.
Referenced by _bt_check_unique(), _bt_doinsert(), _hash_doinsert(), ginEntryInsert(), ginFindLeafPage(), ginHeapTupleFastInsert(), gistinserttuples(), heap_delete(), heap_insert(), heap_multi_insert(), heap_update(), and index_insert().
| void CheckForSerializableConflictOut | ( | Relation | relation, |
| TransactionId | xid, | ||
| Snapshot | snapshot | ||
| ) |
Definition at line 4032 of file predicate.c.
References Assert, dlist_is_empty(), ereport, errcode(), ERRCODE_T_R_SERIALIZATION_FAILURE, errdetail_internal(), errhint(), errmsg, ERROR, fb(), FlagRWConflict(), SERIALIZABLEXACT::flags, GetTopTransactionIdIfAny(), HASH_FIND, hash_search(), SERIALIZABLEXACT::inConflicts, InvalidSerCommitSeqNo, SERIALIZABLEXACT::lastCommitBeforeSnapshot, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MySerializableXact, RWConflictExists(), SERIALIZABLEXACT::SeqNo, SerialGetMinConflictCommitSeqNo(), SerializableXidHash, SerializationNeededForRead(), SXACT_FLAG_DOOMED, SXACT_FLAG_SUMMARY_CONFLICT_OUT, SxactHasConflictOut, SxactHasSummaryConflictIn, SxactHasSummaryConflictOut, SxactIsCommitted, SxactIsDoomed, SxactIsPrepared, SxactIsReadOnly, TransactionIdEquals, TransactionIdIsValid, and XidIsConcurrent().
Referenced by HeapCheckForSerializableConflictOut().
Definition at line 4000 of file predicate.c.
References ereport, errcode(), ERRCODE_T_R_SERIALIZATION_FAILURE, errdetail_internal(), errhint(), errmsg, ERROR, MySerializableXact, SerializationNeededForRead(), and SxactIsDoomed.
Referenced by heap_prepare_pagescan(), and HeapCheckForSerializableConflictOut().
Definition at line 1052 of file predicate.c.
References fb(), SerialControlData::headPage, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), serialControl, SerialPage, SerialPagePrecedesLogically(), SerialSlruCtl, SimpleLruTruncate(), SimpleLruWriteAll(), SerialControlData::tailXid, and TransactionIdIsValid.
Referenced by CheckPointGuts().
Definition at line 4428 of file predicate.c.
References Assert, dlist_mutable_iter::cur, RelFileLocator::dbOid, dlist_container, dlist_foreach_modify, fb(), FlagRWConflict(), GET_PREDICATELOCKTARGETTAG_DB, GET_PREDICATELOCKTARGETTAG_RELATION, hash_seq_init(), hash_seq_search(), i, LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), MySerializableXact, MyXactDidWrite, NUM_PREDICATELOCK_PARTITIONS, PredicateLockHashPartitionLockByIndex, PREDICATELOCKTARGET::predicateLocks, PredicateLockTargetHash, PredXact, RelationData::rd_id, RelationData::rd_index, RelationData::rd_locator, RWConflictExists(), SerializationNeededForWrite(), PredXactListData::SxactGlobalXmin, PREDICATELOCKTARGET::tag, and TransactionIdIsValid.
Referenced by ExecuteTruncateGuts(), and heap_drop_with_catalog().
|
static |
Definition at line 4175 of file predicate.c.
References Assert, dlist_mutable_iter::cur, DecrementParentLocks(), dlist_container, dlist_delete(), dlist_foreach_modify, fb(), FlagRWConflict(), GET_PREDICATELOCKTARGETTAG_OFFSET, GetTransactionSnapshot(), HASH_FIND, HASH_REMOVE, hash_search_with_hash_value(), InvalidSerializableXact, IsInParallelMode(), IsSubTransaction(), LocalPredicateLockHash, LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), MySerializableXact, SERIALIZABLEXACT::perXactPredicateListLock, PredicateLockHash, PredicateLockHashCodeFromTargetHashCode, PredicateLockHashPartitionLock, PREDICATELOCKTARGET::predicateLocks, PredicateLockTargetHash, PredicateLockTargetTagHashCode, RemoveTargetIfNoLongerUsed(), RWConflictExists(), SxactIsCommitted, SxactIsDoomed, and TransactionIdPrecedes().
Referenced by CheckForSerializableConflictIn().
Definition at line 3706 of file predicate.c.
References Assert, PredXactListData::CanPartialClearThrough, dlist_mutable_iter::cur, dlist_container, dlist_delete(), dlist_delete_thoroughly(), dlist_foreach_modify, fb(), FinishedSerializableTransactions, HASH_REMOVE, hash_search_with_hash_value(), PredXactListData::HavePartialClearedThrough, InvalidSerCommitSeqNo, LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), PREDICATELOCKTAG::myTarget, OldCommittedSxact, PredicateLockHash, PredicateLockHashCodeFromTargetHashCode, PredicateLockHashPartitionLock, SERIALIZABLEXACT::predicateLocks, PredicateLockTargetTagHashCode, PredXact, ReleaseOneSerializableXact(), RemoveTargetIfNoLongerUsed(), PredXactListData::SxactGlobalXmin, SxactIsReadOnly, PREDICATELOCKTARGET::tag, TransactionIdIsValid, and TransactionIdPrecedesOrEquals().
Referenced by ReleasePredicateLocks().
|
static |
Definition at line 2120 of file predicate.c.
References fb(), GetParentPredicateLockTag(), and PredicateLockExists().
Referenced by PredicateLockAcquire().
Definition at line 1949 of file predicate.c.
References Assert, fb(), HASH_BLOBS, hash_create(), HASH_ELEM, LocalPredicateLockHash, and max_predicate_locks_per_xact.
Referenced by AttachSerializableXact(), and GetSerializableTransactionSnapshotInt().
|
static |
Definition at line 2462 of file predicate.c.
References PREDICATELOCK::commitSeqNo, dlist_init(), dlist_push_tail(), ereport, errcode(), errhint(), errmsg, ERROR, fb(), HASH_ENTER_NULL, hash_search_with_hash_value(), InvalidSerCommitSeqNo, IsInParallelMode(), LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), PREDICATELOCKTAG::myTarget, PREDICATELOCKTAG::myXact, PredicateLockHash, PredicateLockHashCodeFromTargetHashCode, PredicateLockHashPartitionLock, PREDICATELOCKTARGET::predicateLocks, PredicateLockTargetHash, PREDICATELOCK::targetLink, and PREDICATELOCK::xactLink.
Referenced by predicatelock_twophase_recover(), and PredicateLockAcquire().
|
static |
Definition at line 584 of file predicate.c.
References PredXactListData::activeList, PredXactListData::availableList, dlist_container, dlist_is_empty(), dlist_pop_head_node(), dlist_push_tail(), fb(), and PredXact.
Referenced by GetSerializableTransactionSnapshotInt(), predicatelock_twophase_recover(), and PredicateLockShmemInit().
|
static |
Definition at line 2400 of file predicate.c.
References Assert, fb(), GetParentPredicateLockTag(), HASH_FIND, HASH_REMOVE, hash_search_with_hash_value(), LocalPredicateLockHash, PG_USED_FOR_ASSERTS_ONLY, and PredicateLockTargetTagHashCode.
Referenced by CheckTargetForConflictsIn(), and DeleteChildTargetLocks().
|
static |
Definition at line 2223 of file predicate.c.
References Assert, dlist_mutable_iter::cur, DecrementParentLocks(), dlist_container, dlist_delete(), dlist_foreach_modify, fb(), HASH_REMOVE, hash_search_with_hash_value(), IsInParallelMode(), LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), MySerializableXact, PG_USED_FOR_ASSERTS_ONLY, PredicateLockHash, PredicateLockHashCodeFromTargetHashCode, PredicateLockHashPartitionLock, PredicateLockTargetTagHashCode, RemoveTargetIfNoLongerUsed(), and TargetTagIsCoveredBy.
Referenced by PredicateLockAcquire().
|
static |
Definition at line 2678 of file predicate.c.
References Assert, dlist_mutable_iter::cur, dlist_container, dlist_delete(), dlist_foreach_modify, fb(), HASH_REMOVE, hash_search_with_hash_value(), LW_EXCLUSIVE, LWLockAcquire(), LWLockHeldByMe(), LWLockHeldByMeInMode(), LWLockRelease(), PredicateLockHash, PredicateLockHashCodeFromTargetHashCode, PredicateLockHashPartitionLock, PREDICATELOCKTARGET::predicateLocks, and RemoveTargetIfNoLongerUsed().
Referenced by TransferPredicateLocksToNewTarget().
Definition at line 2946 of file predicate.c.
References Assert, SERIALIZABLEXACT::commitSeqNo, dlist_mutable_iter::cur, RelFileLocator::dbOid, dlist_container, dlist_delete(), dlist_foreach_modify, dlist_init(), dlist_push_tail(), fb(), GET_PREDICATELOCKTARGETTAG_DB, GET_PREDICATELOCKTARGETTAG_RELATION, GET_PREDICATELOCKTARGETTAG_TYPE, HASH_ENTER, HASH_REMOVE, hash_search(), hash_search_with_hash_value(), hash_seq_init(), hash_seq_search(), i, InvalidOid, InvalidSerCommitSeqNo, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PREDICATELOCKTAG::myTarget, NUM_PREDICATELOCK_PARTITIONS, OldCommittedSxact, PredicateLockHash, PredicateLockHashCodeFromTargetHashCode, PredicateLockHashPartitionLockByIndex, PredicateLockingNeededForRelation(), PredicateLockTargetHash, PredicateLockTargetTagHashCode, PREDLOCKTAG_RELATION, PredXact, RelationData::rd_id, RelationData::rd_index, RelationData::rd_locator, RemoveScratchTarget(), RestoreScratchTarget(), SET_PREDICATELOCKTARGETTAG_RELATION, PredXactListData::SxactGlobalXmin, and TransactionIdIsValid.
Referenced by TransferPredicateLocksToHeapRelation().
|
static |
Definition at line 4510 of file predicate.c.
References Assert, fb(), SERIALIZABLEXACT::flags, OldCommittedSxact, OnConflict_CheckForSerializationFailure(), SetRWConflict(), SXACT_FLAG_SUMMARY_CONFLICT_IN, and SXACT_FLAG_SUMMARY_CONFLICT_OUT.
Referenced by CheckForSerializableConflictOut(), CheckTableForSerializableConflictIn(), and CheckTargetForConflictsIn().
|
static |
Definition at line 701 of file predicate.c.
References Assert, dlist_mutable_iter::cur, dlist_container, dlist_foreach_modify, fb(), ReleaseRWConflict(), SXACT_FLAG_RO_UNSAFE, SxactIsReadOnly, and SxactIsROSafe.
Referenced by ReleasePredicateLocks().
|
static |
Definition at line 2081 of file predicate.c.
References Assert, GET_PREDICATELOCKTARGETTAG_DB, GET_PREDICATELOCKTARGETTAG_PAGE, GET_PREDICATELOCKTARGETTAG_RELATION, GET_PREDICATELOCKTARGETTAG_TYPE, PREDLOCKTAG_PAGE, PREDLOCKTAG_RELATION, PREDLOCKTAG_TUPLE, SET_PREDICATELOCKTARGETTAG_PAGE, and SET_PREDICATELOCKTARGETTAG_RELATION.
Referenced by CheckAndPromotePredicateLockRequest(), CoarserLockCovers(), DecrementParentLocks(), and PredicateLockPageSplit().
| PredicateLockData * GetPredicateLockStatusData | ( | void | ) |
Definition at line 1456 of file predicate.c.
References Assert, data, fb(), hash_get_num_entries(), hash_seq_init(), hash_seq_search(), i, LW_SHARED, LWLockAcquire(), LWLockRelease(), NUM_PREDICATELOCK_PARTITIONS, palloc_array, palloc_object, PredicateLockHash, and PredicateLockHashPartitionLockByIndex.
Referenced by pg_lock_status().
Definition at line 1567 of file predicate.c.
References Assert, DEBUG2, dlist_is_empty(), ereport, errcode(), ERRCODE_T_R_SERIALIZATION_FAILURE, errmsg_internal(), fb(), SERIALIZABLEXACT::flags, GetSerializableTransactionSnapshotInt(), InvalidPid, InvalidSerializableXact, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MySerializableXact, SERIALIZABLEXACT::possibleUnsafeConflicts, ProcWaitForSignal(), ReleasePredicateLocks(), SXACT_FLAG_DEFERRABLE_WAITING, SxactIsROSafe, SxactIsROUnsafe, XactDeferrable, and XactReadOnly.
Referenced by GetSerializableTransactionSnapshot().
Definition at line 1637 of file predicate.c.
References PredXactListData::activeList, dlist_iter::cur, dlist_container, dlist_foreach, fb(), LW_SHARED, LWLockAcquire(), LWLockRelease(), output, PredXact, and SxactIsDeferrableWaiting.
Referenced by pg_isolation_test_session_is_blocked(), and pg_safe_snapshot_blocking_pids().
Definition at line 1691 of file predicate.c.
References Assert, ereport, errcode(), errdetail(), errhint(), errmsg, ERROR, fb(), GetSafeSnapshot(), GetSerializableTransactionSnapshotInt(), InvalidPid, IsolationIsSerializable, RecoveryInProgress(), XactDeferrable, and XactReadOnly.
Referenced by GetTransactionSnapshot().
|
static |
Definition at line 1773 of file predicate.c.
References PredXactListData::activeList, Assert, CreateLocalPredicateLockHash(), CreatePredXact(), dlist_iter::cur, dlist_container, dlist_foreach, dlist_init(), dlist_is_empty(), dlist_node_init(), elog, ereport, errcode(), errdetail(), errmsg, ERROR, fb(), GET_VXID_FROM_PGPROC, GetSnapshotData(), GetTopTransactionIdIfAny(), InvalidSerCommitSeqNo, InvalidSerializableXact, InvalidTransactionId, IsInParallelMode(), PredXactListData::LastSxactCommitSeqNo, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), max_prepared_xacts, MaxBackends, MyProc, MyProcNumber, MyProcPid, MySerializableXact, MyXactDidWrite, PredXact, ProcArrayInstallImportedXmin(), RecoveryInProgress(), ReleasePredXact(), SerialSetActiveSerXmin(), SetPossibleUnsafeConflict(), SummarizeOldestCommittedSxact(), SXACT_FLAG_READ_ONLY, PredXactListData::SxactGlobalXmin, PredXactListData::SxactGlobalXminCount, SxactIsCommitted, SxactIsDoomed, SxactIsReadOnly, TransactionIdEquals, TransactionIdFollows(), TransactionIdIsValid, PredXactListData::WritableSxactCount, XactReadOnly, and SnapshotData::xmin.
Referenced by GetSafeSnapshot(), GetSerializableTransactionSnapshot(), and SetSerializableTransactionSnapshot().
|
static |
Definition at line 2298 of file predicate.c.
References Assert, GET_PREDICATELOCKTARGETTAG_TYPE, max_predicate_locks_per_page, max_predicate_locks_per_relation, max_predicate_locks_per_xact, PREDLOCKTAG_PAGE, PREDLOCKTAG_RELATION, and PREDLOCKTAG_TUPLE.
Referenced by CheckAndPromotePredicateLockRequest().
|
static |
Definition at line 4545 of file predicate.c.
References Assert, SERIALIZABLEXACT::commitSeqNo, dlist_iter::cur, dlist_container, dlist_foreach, ereport, errcode(), ERRCODE_T_R_SERIALIZATION_FAILURE, errdetail_internal(), errhint(), errmsg, ERROR, fb(), SERIALIZABLEXACT::lastCommitBeforeSnapshot, LWLockHeldByMe(), LWLockRelease(), MySerializableXact, SERIALIZABLEXACT::SeqNo, SXACT_FLAG_DOOMED, SxactHasConflictOut, SxactHasSummaryConflictIn, SxactHasSummaryConflictOut, SxactIsCommitted, SxactIsDoomed, SxactIsPrepared, SxactIsReadOnly, and unconstify.
Referenced by FlagRWConflict().
| bool PageIsPredicateLocked | ( | Relation | relation, |
| BlockNumber | blkno | ||
| ) |
Definition at line 2017 of file predicate.c.
References RelFileLocator::dbOid, fb(), HASH_FIND, hash_search_with_hash_value(), LW_SHARED, LWLockAcquire(), LWLockRelease(), PredicateLockHashPartitionLock, PredicateLockTargetHash, PredicateLockTargetTagHashCode, RelationData::rd_id, RelationData::rd_locator, and SET_PREDICATELOCKTARGETTAG_PAGE.
| void PostPrepare_PredicateLocks | ( | FullTransactionId | fxid | ) |
Definition at line 4868 of file predicate.c.
References Assert, fb(), hash_destroy(), INVALID_PROC_NUMBER, InvalidSerializableXact, LocalPredicateLockHash, MySerializableXact, MyXactDidWrite, SERIALIZABLEXACT::pgprocno, SERIALIZABLEXACT::pid, and SxactIsPrepared.
Referenced by PrepareTransaction().
Definition at line 4712 of file predicate.c.
References Assert, dlist_container, dlist_foreach, ereport, errcode(), ERRCODE_T_R_SERIALIZATION_FAILURE, errdetail_internal(), errhint(), errmsg, ERROR, fb(), SERIALIZABLEXACT::flags, SERIALIZABLEXACT::inConflicts, InvalidSerializableXact, IsolationIsSerializable, PredXactListData::LastSxactCommitSeqNo, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MySerializableXact, PredXact, SERIALIZABLEXACT::prepareSeqNo, SXACT_FLAG_DOOMED, SXACT_FLAG_PREPARED, SxactIsCommitted, SxactIsDoomed, SxactIsPartiallyReleased, SxactIsPrepared, and SxactIsReadOnly.
Referenced by CommitTransaction(), and PrepareTransaction().
Definition at line 1430 of file predicate.c.
References Assert, fb(), PredicateLockHashCodeFromTargetHashCode, and PredicateLockTargetTagHashCode.
Referenced by PredicateLockShmemInit().
| void predicatelock_twophase_recover | ( | FullTransactionId | fxid, |
| uint16 | info, | ||
| void * | recdata, | ||
| uint32 | len | ||
| ) |
Definition at line 4918 of file predicate.c.
References Assert, CreatePredicateLock(), CreatePredXact(), TwoPhasePredicateRecord::data, dlist_init(), dlist_node_init(), ereport, errcode(), errmsg, ERROR, fb(), TwoPhasePredicateXactRecord::flags, HASH_ENTER, HASH_FIND, hash_search(), INVALID_PROC_NUMBER, InvalidSerCommitSeqNo, InvalidSerializableXact, InvalidTransactionId, len, TwoPhasePredicateRecord::lockRecord, LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockRelease(), max_prepared_xacts, MaxBackends, PredicateLockTargetTagHashCode, PredXact, RecoverySerCommitSeqNo, SerializableXidHash, SerialSetActiveSerXmin(), SXACT_FLAG_SUMMARY_CONFLICT_IN, SXACT_FLAG_SUMMARY_CONFLICT_OUT, PredXactListData::SxactGlobalXmin, PredXactListData::SxactGlobalXminCount, SxactIsPrepared, SxactIsReadOnly, TwoPhasePredicateLockRecord::target, TransactionIdEquals, TransactionIdFollows(), TransactionIdIsValid, TWOPHASEPREDICATERECORD_LOCK, TWOPHASEPREDICATERECORD_XACT, TwoPhasePredicateRecord::type, PredXactListData::WritableSxactCount, TwoPhasePredicateRecord::xactRecord, XidFromFullTransactionId, and TwoPhasePredicateXactRecord::xmin.
|
static |
Definition at line 2526 of file predicate.c.
References CheckAndPromotePredicateLockRequest(), CoarserLockCovers(), CreatePredicateLock(), DeleteChildTargetLocks(), fb(), GET_PREDICATELOCKTARGETTAG_TYPE, HASH_ENTER, hash_search_with_hash_value(), LocalPredicateLockHash, MySerializableXact, PredicateLockExists(), PredicateLockTargetTagHashCode, and PREDLOCKTAG_TUPLE.
Referenced by CheckAndPromotePredicateLockRequest(), PredicateLockPage(), PredicateLockRelation(), and PredicateLockTID().
|
static |
Definition at line 2054 of file predicate.c.
References fb(), HASH_FIND, hash_search(), LOCALPREDICATELOCK::held, and LocalPredicateLockHash.
Referenced by CoarserLockCovers(), PredicateLockAcquire(), and PredicateLockTID().
Definition at line 500 of file predicate.c.
References FirstUnpinnedObjectId, RelationData::rd_id, and RelationUsesLocalBuffers.
Referenced by DropAllPredicateLocksFromTable(), PredicateLockPageSplit(), SerializationNeededForRead(), and SerializationNeededForWrite().
| void PredicateLockPage | ( | Relation | relation, |
| BlockNumber | blkno, | ||
| Snapshot | snapshot | ||
| ) |
Definition at line 2608 of file predicate.c.
References RelFileLocator::dbOid, PredicateLockAcquire(), RelationData::rd_id, RelationData::rd_locator, SerializationNeededForRead(), and SET_PREDICATELOCKTARGETTAG_PAGE.
Referenced by _bt_readpage(), _hash_first(), _hash_readnext(), collectMatchBitmap(), gistScanPage(), IndexOnlyNext(), moveRightIfItNeeded(), scanPendingInsert(), and startScanEntry().
| void PredicateLockPageCombine | ( | Relation | relation, |
| BlockNumber | oldblkno, | ||
| BlockNumber | newblkno | ||
| ) |
Definition at line 3238 of file predicate.c.
References fb(), and PredicateLockPageSplit().
Referenced by _bt_mark_page_halfdead(), and ginDeletePostingPage().
| void PredicateLockPageSplit | ( | Relation | relation, |
| BlockNumber | oldblkno, | ||
| BlockNumber | newblkno | ||
| ) |
Definition at line 3153 of file predicate.c.
References Assert, BlockNumberIsValid(), RelFileLocator::dbOid, fb(), GetParentPredicateLockTag(), LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), PredicateLockingNeededForRelation(), PredXact, RelationData::rd_id, RelationData::rd_locator, SET_PREDICATELOCKTARGETTAG_PAGE, success, PredXactListData::SxactGlobalXmin, TransactionIdIsValid, and TransferPredicateLocksToNewTarget().
Referenced by _bt_insertonpg(), _hash_splitbucket(), createPostingTree(), ginPlaceToPage(), gistplacetopage(), and PredicateLockPageCombine().
Definition at line 2585 of file predicate.c.
References RelFileLocator::dbOid, PredicateLockAcquire(), RelationData::rd_id, RelationData::rd_locator, SerializationNeededForRead(), and SET_PREDICATELOCKTARGETTAG_RELATION.
Referenced by _bt_endpoint(), _bt_first(), heap_beginscan(), and index_beginscan_internal().
Definition at line 1156 of file predicate.c.
References PredXactListData::activeList, add_size(), Assert, PredXactListData::availableList, RWConflictPoolHeaderData::availableList, PredXactListData::CanPartialClearThrough, SERIALIZABLEXACT::commitSeqNo, CreatePredXact(), dlist_init(), dlist_node_init(), dlist_push_tail(), PredXactListData::element, RWConflictPoolHeaderData::element, HASHCTL::entrysize, fb(), SERIALIZABLEXACT::finishedBefore, SERIALIZABLEXACT::finishedLink, FinishedSerializableTransactions, FirstNormalSerCommitSeqNo, SERIALIZABLEXACT::flags, HASHCTL::hash, HASH_BLOBS, HASH_ELEM, HASH_ENTER, HASH_FIXED_SIZE, HASH_FUNCTION, HASH_PARTITION, hash_search(), PredXactListData::HavePartialClearedThrough, i, SERIALIZABLEXACT::inConflicts, INVALID_PROC_NUMBER, InvalidTransactionId, IsUnderPostmaster, HASHCTL::keysize, SERIALIZABLEXACT::lastCommitBeforeSnapshot, PredXactListData::LastSxactCommitSeqNo, LWLockInitialize(), max_prepared_xacts, MaxBackends, mul_size(), NPREDICATELOCKTARGETENTS, HASHCTL::num_partitions, NUM_PREDICATELOCK_PARTITIONS, OldCommittedSxact, PredXactListData::OldCommittedSxact, SERIALIZABLEXACT::outConflicts, RWConflictData::outLink, SERIALIZABLEXACT::perXactPredicateListLock, SERIALIZABLEXACT::pgprocno, SERIALIZABLEXACT::pid, SERIALIZABLEXACT::possibleUnsafeConflicts, predicatelock_hash(), PredicateLockHash, PredicateLockHashPartitionLock, SERIALIZABLEXACT::predicateLocks, PredicateLockTargetHash, PredicateLockTargetTagHashCode, PredXact, PredXactListDataSize, SERIALIZABLEXACT::prepareSeqNo, RWConflictDataSize, RWConflictPool, RWConflictPoolHeaderDataSize, ScratchPartitionLock, ScratchTargetTag, ScratchTargetTagHash, SERIALIZABLEXACT::SeqNo, SerialInit(), SerializableXidHash, SetInvalidVirtualTransactionId, ShmemInitHash(), ShmemInitStruct(), SXACT_FLAG_COMMITTED, PredXactListData::SxactGlobalXmin, PredXactListData::SxactGlobalXminCount, SERIALIZABLEXACT::topXid, SERIALIZABLEXACT::vxid, PredXactListData::WritableSxactCount, SERIALIZABLEXACT::xactLink, and SERIALIZABLEXACT::xmin.
Referenced by CreateOrAttachShmemStructs().
Definition at line 1368 of file predicate.c.
References add_size(), fb(), hash_estimate_size(), max_prepared_xacts, MaxBackends, mul_size(), NPREDICATELOCKTARGETENTS, PredXactListDataSize, RWConflictDataSize, RWConflictPoolHeaderDataSize, serializable_buffers, and SimpleLruShmemSize().
Referenced by CalculateShmemSize().
| void PredicateLockTID | ( | Relation | relation, |
| const ItemPointerData * | tid, | ||
| Snapshot | snapshot, | ||
| TransactionId | tuple_xid | ||
| ) |
Definition at line 2630 of file predicate.c.
References RelFileLocator::dbOid, fb(), ItemPointerGetBlockNumber(), ItemPointerGetOffsetNumber(), PredicateLockAcquire(), PredicateLockExists(), RelationData::rd_id, RelationData::rd_index, RelationData::rd_locator, SerializationNeededForRead(), SET_PREDICATELOCKTARGETTAG_RELATION, SET_PREDICATELOCKTARGETTAG_TUPLE, and TransactionIdIsCurrentTransactionId().
Referenced by BitmapHeapScanNextBlock(), heap_fetch(), and heap_hot_search_buffer().
| void PredicateLockTwoPhaseFinish | ( | FullTransactionId | fxid, |
| bool | isCommit | ||
| ) |
Definition at line 4891 of file predicate.c.
References fb(), HASH_FIND, hash_search(), LW_SHARED, LWLockAcquire(), LWLockRelease(), MySerializableXact, MyXactDidWrite, ReleasePredicateLocks(), SerializableXidHash, SERIALIZABLEXIDTAG::xid, and XidFromFullTransactionId.
Referenced by FinishPreparedTransaction().
| void RegisterPredicateLockingXid | ( | TransactionId | xid | ) |
Definition at line 1968 of file predicate.c.
References Assert, fb(), HASH_ENTER, hash_search(), InvalidSerializableXact, InvalidTransactionId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MySerializableXact, SerializableXidHash, SERIALIZABLEXACT::topXid, and TransactionIdIsValid.
Referenced by AssignTransactionId().
|
static |
Definition at line 3844 of file predicate.c.
References Assert, dlist_mutable_iter::cur, dlist_container, dlist_delete(), dlist_foreach_modify, dlist_init(), dlist_push_tail(), ereport, errcode(), errhint(), errmsg, ERROR, fb(), HASH_ENTER_NULL, HASH_REMOVE, hash_search(), hash_search_with_hash_value(), InvalidSerCommitSeqNo, InvalidTransactionId, IsInParallelMode(), LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockHeldByMe(), LWLockRelease(), PREDICATELOCKTAG::myTarget, PREDICATELOCKTAG::myXact, OldCommittedSxact, PredicateLockHash, PredicateLockHashCodeFromTargetHashCode, PredicateLockHashPartitionLock, SERIALIZABLEXACT::predicateLocks, PREDICATELOCKTARGET::predicateLocks, PredicateLockTargetTagHashCode, ReleasePredXact(), ReleaseRWConflict(), RemoveTargetIfNoLongerUsed(), SerializableXidHash, SXACT_FLAG_SUMMARY_CONFLICT_IN, SXACT_FLAG_SUMMARY_CONFLICT_OUT, SxactIsCommitted, SxactIsOnFinishedList, SxactIsRolledBack, and PREDICATELOCKTARGET::tag.
Referenced by ClearOldPredicateLocks(), ReleasePredicateLocks(), and SummarizeOldestCommittedSxact().
Definition at line 3321 of file predicate.c.
References Assert, PredXactListData::CanPartialClearThrough, ClearOldPredicateLocks(), SERIALIZABLEXACT::commitSeqNo, dlist_mutable_iter::cur, dlist_container, dlist_foreach_modify, dlist_is_empty(), dlist_push_tail(), SERIALIZABLEXACT::earliestOutConflictCommit, fb(), SERIALIZABLEXACT::finishedBefore, SERIALIZABLEXACT::finishedLink, FinishedSerializableTransactions, FirstNormalSerCommitSeqNo, SERIALIZABLEXACT::flags, FlagSxactUnsafe(), SERIALIZABLEXACT::inConflicts, InvalidSerializableXact, IsInParallelMode(), IsolationIsSerializable, IsParallelWorker, PredXactListData::LastSxactCommitSeqNo, LocalPredicateLockHash, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MySerializableXact, MyXactDidWrite, TransamVariablesData::nextXid, SERIALIZABLEXACT::outConflicts, ParallelContextActive(), SERIALIZABLEXACT::pid, SERIALIZABLEXACT::possibleUnsafeConflicts, PredXact, ProcSendSignal(), ReleaseOneSerializableXact(), ReleasePredicateLocksLocal(), ReleaseRWConflict(), SavedSerializableXact, SERIALIZABLEXACT::SeqNo, SetNewSxactGlobalXmin(), SXACT_FLAG_COMMITTED, SXACT_FLAG_CONFLICT_OUT, SXACT_FLAG_DOOMED, SXACT_FLAG_PARTIALLY_RELEASED, SXACT_FLAG_READ_ONLY, SXACT_FLAG_RO_SAFE, SXACT_FLAG_ROLLED_BACK, PredXactListData::SxactGlobalXmin, PredXactListData::SxactGlobalXminCount, SxactHasConflictOut, SxactHasSummaryConflictOut, SxactIsCommitted, SxactIsDeferrableWaiting, SxactIsDoomed, SxactIsOnFinishedList, SxactIsPartiallyReleased, SxactIsPrepared, SxactIsReadOnly, SxactIsRolledBack, SxactIsROSafe, SxactIsROUnsafe, TransactionIdEquals, TransamVariables, PredXactListData::WritableSxactCount, XidFromFullTransactionId, and SERIALIZABLEXACT::xmin.
Referenced by GetSafeSnapshot(), PredicateLockTwoPhaseFinish(), ResourceOwnerReleaseInternal(), and SerializationNeededForRead().
Definition at line 3688 of file predicate.c.
References fb(), hash_destroy(), InvalidSerializableXact, LocalPredicateLockHash, MySerializableXact, and MyXactDidWrite.
Referenced by ReleasePredicateLocks().
|
static |
Definition at line 598 of file predicate.c.
References Assert, PredXactListData::availableList, dlist_delete(), dlist_push_tail(), fb(), PredXact, and ShmemAddrIsValid().
Referenced by GetSerializableTransactionSnapshotInt(), and ReleaseOneSerializableXact().
|
static |
Definition at line 693 of file predicate.c.
References RWConflictPoolHeaderData::availableList, dlist_delete(), dlist_push_tail(), fb(), and RWConflictPool.
Referenced by FlagSxactUnsafe(), ReleaseOneSerializableXact(), and ReleasePredicateLocks().
Definition at line 2149 of file predicate.c.
References Assert, fb(), HASH_REMOVE, hash_search_with_hash_value(), LW_EXCLUSIVE, LWLockAcquire(), LWLockHeldByMe(), LWLockRelease(), PredicateLockTargetHash, ScratchPartitionLock, ScratchTargetTag, and ScratchTargetTagHash.
Referenced by DropAllPredicateLocksFromTable(), and TransferPredicateLocksToNewTarget().
|
static |
Definition at line 2192 of file predicate.c.
References Assert, dlist_is_empty(), fb(), HASH_REMOVE, hash_search_with_hash_value(), LWLockHeldByMe(), PG_USED_FOR_ASSERTS_ONLY, PREDICATELOCKTARGET::predicateLocks, PredicateLockTargetHash, and PREDICATELOCKTARGET::tag.
Referenced by CheckTargetForConflictsIn(), ClearOldPredicateLocks(), DeleteChildTargetLocks(), DeleteLockTarget(), ReleaseOneSerializableXact(), and TransferPredicateLocksToNewTarget().
Definition at line 2170 of file predicate.c.
References Assert, fb(), HASH_ENTER, hash_search_with_hash_value(), LW_EXCLUSIVE, LWLockAcquire(), LWLockHeldByMe(), LWLockRelease(), PredicateLockTargetHash, ScratchPartitionLock, ScratchTargetTag, and ScratchTargetTagHash.
Referenced by DropAllPredicateLocksFromTable(), and TransferPredicateLocksToNewTarget().
|
static |
Definition at line 612 of file predicate.c.
References Assert, dlist_iter::cur, dlist_container, dlist_foreach, dlist_is_empty(), fb(), SERIALIZABLEXACT::outConflicts, SxactIsDoomed, and unconstify.
Referenced by CheckForSerializableConflictOut(), CheckTableForSerializableConflictIn(), CheckTargetForConflictsIn(), and SetRWConflict().
Definition at line 748 of file predicate.c.
References errdetail(), and fb().
Referenced by SerialInit().
|
static |
Definition at line 869 of file predicate.c.
References Assert, fb(), SerialControlData::headPage, SerialControlData::headXid, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), serialControl, SerialNextPage, SerialPage, SerialPagePrecedesLogically(), SerialSlruCtl, SerialValue, SimpleLruGetBankLock(), SimpleLruReadPage(), SimpleLruZeroPage(), SerialControlData::tailXid, TransactionIdFollows(), TransactionIdIsValid, and TransactionIdPrecedes().
Referenced by SummarizeOldestCommittedSxact().
|
static |
Definition at line 960 of file predicate.c.
References Assert, fb(), SerialControlData::headXid, LW_SHARED, LWLockAcquire(), LWLockRelease(), serialControl, SerialPage, SerialSlruCtl, SerialValue, SimpleLruGetBankLock(), SimpleLruReadPage_ReadOnly(), SerialControlData::tailXid, TransactionIdFollows(), TransactionIdIsValid, TransactionIdPrecedes(), and val.
Referenced by CheckForSerializableConflictOut().
Definition at line 816 of file predicate.c.
References Assert, fb(), SerialControlData::headPage, SerialControlData::headXid, InvalidTransactionId, IsUnderPostmaster, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), SERIAL_ENTRIESPERPAGE, serial_errdetail_for_io_error(), serialControl, serializable_buffers, SerialPagePrecedesLogically(), SerialSlruCtl, ShmemInitStruct(), SimpleLruInit(), SlruPagePrecedesUnitTests, SYNC_HANDLER_NONE, and SerialControlData::tailXid.
Referenced by PredicateLockShmemInit().
Definition at line 518 of file predicate.c.
References InvalidSerializableXact, IsMVCCSnapshot, MySerializableXact, PredicateLockingNeededForRelation(), ReleasePredicateLocks(), and SxactIsROSafe.
Referenced by CheckForSerializableConflictOut(), CheckForSerializableConflictOutNeeded(), PredicateLockPage(), PredicateLockRelation(), and PredicateLockTID().
Definition at line 562 of file predicate.c.
References InvalidSerializableXact, MySerializableXact, and PredicateLockingNeededForRelation().
Referenced by CheckForSerializableConflictIn(), and CheckTableForSerializableConflictIn().
Definition at line 733 of file predicate.c.
References fb(), FirstNormalTransactionId, SERIAL_ENTRIESPERPAGE, and TransactionIdPrecedes().
Referenced by CheckPointPredicate(), SerialAdd(), and SerialInit().
|
static |
Definition at line 1001 of file predicate.c.
References Assert, fb(), SerialControlData::headPage, SerialControlData::headXid, InvalidTransactionId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), RecoveryInProgress(), serialControl, SerialControlData::tailXid, TransactionIdFollows(), TransactionIdIsValid, and TransactionIdPrecedes().
Referenced by GetSerializableTransactionSnapshotInt(), predicatelock_twophase_recover(), and SetNewSxactGlobalXmin().
Definition at line 3260 of file predicate.c.
References PredXactListData::activeList, Assert, dlist_iter::cur, dlist_container, dlist_foreach, fb(), InvalidTransactionId, LWLockHeldByMe(), OldCommittedSxact, PredXact, SerialSetActiveSerXmin(), PredXactListData::SxactGlobalXmin, PredXactListData::SxactGlobalXminCount, SxactIsCommitted, SxactIsRolledBack, TransactionIdEquals, TransactionIdIsValid, and TransactionIdPrecedes().
Referenced by ReleasePredicateLocks().
|
static |
Definition at line 668 of file predicate.c.
References Assert, RWConflictPoolHeaderData::availableList, dlist_delete(), dlist_head_element, dlist_is_empty(), dlist_push_tail(), ereport, errcode(), errhint(), errmsg, ERROR, fb(), RWConflictPool, and SxactIsReadOnly.
Referenced by GetSerializableTransactionSnapshotInt().
|
static |
Definition at line 645 of file predicate.c.
References Assert, RWConflictPoolHeaderData::availableList, dlist_delete(), dlist_head_element, dlist_is_empty(), dlist_push_tail(), ereport, errcode(), errhint(), errmsg, ERROR, fb(), SERIALIZABLEXACT::outConflicts, RWConflictExists(), and RWConflictPool.
Referenced by FlagRWConflict().
| void SetSerializableTransactionSnapshot | ( | Snapshot | snapshot, |
| VirtualTransactionId * | sourcevxid, | ||
| int | sourcepid | ||
| ) |
Definition at line 1731 of file predicate.c.
References Assert, ereport, errcode(), errmsg, ERROR, fb(), GetSerializableTransactionSnapshotInt(), IsolationIsSerializable, IsParallelWorker, XactDeferrable, and XactReadOnly.
Referenced by SetTransactionSnapshot().
| SerializableXactHandle ShareSerializableXact | ( | void | ) |
Definition at line 5056 of file predicate.c.
References MySerializableXact.
Referenced by InitializeParallelDSM().
Definition at line 1512 of file predicate.c.
References dlist_delete_thoroughly(), dlist_head_element, dlist_is_empty(), fb(), FinishedSerializableTransactions, InvalidSerCommitSeqNo, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), ReleaseOneSerializableXact(), SerialAdd(), SxactHasConflictOut, SxactIsReadOnly, and TransactionIdIsValid.
Referenced by GetSerializableTransactionSnapshotInt().
Definition at line 3132 of file predicate.c.
References DropAllPredicateLocksFromTable().
Referenced by ATRewriteTable(), cluster_rel(), index_concurrently_set_dead(), index_drop(), and reindex_index().
|
static |
Definition at line 2739 of file predicate.c.
References Assert, PREDICATELOCK::commitSeqNo, dlist_mutable_iter::cur, DeleteLockTarget(), dlist_container, dlist_delete(), dlist_foreach_modify, dlist_init(), dlist_is_empty(), dlist_push_tail(), fb(), HASH_ENTER_NULL, HASH_FIND, HASH_REMOVE, hash_search_with_hash_value(), InvalidSerCommitSeqNo, LW_EXCLUSIVE, LW_SHARED, LWLockAcquire(), LWLockHeldByMeInMode(), LWLockRelease(), OldCommittedSxact, PredicateLockHash, PredicateLockHashCodeFromTargetHashCode, PredicateLockHashPartitionLock, PredicateLockTargetHash, PredicateLockTargetTagHashCode, RemoveScratchTarget(), RemoveTargetIfNoLongerUsed(), and RestoreScratchTarget().
Referenced by PredicateLockPageSplit().
|
static |
Definition at line 3981 of file predicate.c.
References Assert, fb(), GetTopTransactionIdIfAny(), GetTransactionSnapshot(), pg_lfind32(), TransactionIdEquals, TransactionIdFollowsOrEquals(), TransactionIdIsValid, and TransactionIdPrecedes().
Referenced by CheckForSerializableConflictOut().
|
static |
Definition at line 400 of file predicate.c.
Referenced by ClearOldPredicateLocks(), PredicateLockShmemInit(), ReleasePredicateLocks(), and SummarizeOldestCommittedSxact().
Definition at line 415 of file predicate.c.
Referenced by CheckAndPromotePredicateLockRequest(), CheckTargetForConflictsIn(), CreateLocalPredicateLockHash(), DecrementParentLocks(), PostPrepare_PredicateLocks(), PredicateLockAcquire(), PredicateLockExists(), ReleasePredicateLocks(), and ReleasePredicateLocksLocal().
| int max_predicate_locks_per_page |
Definition at line 374 of file predicate.c.
Referenced by MaxPredicateChildLocks().
| int max_predicate_locks_per_relation |
Definition at line 373 of file predicate.c.
Referenced by MaxPredicateChildLocks().
| int max_predicate_locks_per_xact |
Definition at line 372 of file predicate.c.
Referenced by CreateLocalPredicateLockHash(), and MaxPredicateChildLocks().
|
static |
Definition at line 422 of file predicate.c.
Referenced by AtPrepare_PredicateLocks(), AttachSerializableXact(), CheckForSerializableConflictIn(), CheckForSerializableConflictOut(), CheckForSerializableConflictOutNeeded(), CheckTableForSerializableConflictIn(), CheckTargetForConflictsIn(), DeleteChildTargetLocks(), GetSafeSnapshot(), GetSerializableTransactionSnapshotInt(), OnConflict_CheckForSerializationFailure(), PostPrepare_PredicateLocks(), PreCommit_CheckForSerializationFailure(), PredicateLockAcquire(), PredicateLockTwoPhaseFinish(), RegisterPredicateLockingXid(), ReleasePredicateLocks(), ReleasePredicateLocksLocal(), SerializationNeededForRead(), SerializationNeededForWrite(), and ShareSerializableXact().
Definition at line 423 of file predicate.c.
Referenced by CheckForSerializableConflictIn(), CheckTableForSerializableConflictIn(), GetSerializableTransactionSnapshotInt(), PostPrepare_PredicateLocks(), PredicateLockTwoPhaseFinish(), ReleasePredicateLocks(), and ReleasePredicateLocksLocal().
|
static |
Definition at line 363 of file predicate.c.
Referenced by ClearOldPredicateLocks(), DropAllPredicateLocksFromTable(), FlagRWConflict(), PredicateLockShmemInit(), ReleaseOneSerializableXact(), SetNewSxactGlobalXmin(), and TransferPredicateLocksToNewTarget().
|
static |
Definition at line 399 of file predicate.c.
Referenced by CheckTargetForConflictsIn(), ClearOldPredicateLocks(), CreatePredicateLock(), DeleteChildTargetLocks(), DeleteLockTarget(), DropAllPredicateLocksFromTable(), GetPredicateLockStatusData(), PredicateLockShmemInit(), ReleaseOneSerializableXact(), and TransferPredicateLocksToNewTarget().
|
static |
Definition at line 398 of file predicate.c.
Referenced by CheckTableForSerializableConflictIn(), CheckTargetForConflictsIn(), CreatePredicateLock(), DropAllPredicateLocksFromTable(), PageIsPredicateLocked(), PredicateLockShmemInit(), RemoveScratchTarget(), RemoveTargetIfNoLongerUsed(), RestoreScratchTarget(), and TransferPredicateLocksToNewTarget().
|
static |
Definition at line 385 of file predicate.c.
Referenced by CheckTableForSerializableConflictIn(), ClearOldPredicateLocks(), CreatePredXact(), DropAllPredicateLocksFromTable(), GetSafeSnapshotBlockingPids(), GetSerializableTransactionSnapshotInt(), PreCommit_CheckForSerializationFailure(), predicatelock_twophase_recover(), PredicateLockPageSplit(), PredicateLockShmemInit(), ReleasePredicateLocks(), ReleasePredXact(), and SetNewSxactGlobalXmin().
|
static |
Definition at line 391 of file predicate.c.
Referenced by PredicateLockShmemInit(), ReleaseRWConflict(), SetPossibleUnsafeConflict(), and SetRWConflict().
|
static |
Definition at line 432 of file predicate.c.
Referenced by ReleasePredicateLocks().
|
static |
Definition at line 409 of file predicate.c.
Referenced by PredicateLockShmemInit(), RemoveScratchTarget(), and RestoreScratchTarget().
|
static |
Definition at line 407 of file predicate.c.
Referenced by PredicateLockShmemInit(), RemoveScratchTarget(), and RestoreScratchTarget().
|
static |
Definition at line 408 of file predicate.c.
Referenced by PredicateLockShmemInit(), RemoveScratchTarget(), and RestoreScratchTarget().
|
static |
Definition at line 355 of file predicate.c.
Referenced by CheckPointPredicate(), SerialAdd(), SerialGetMinConflictCommitSeqNo(), SerialInit(), and SerialSetActiveSerXmin().
|
static |
Definition at line 397 of file predicate.c.
Referenced by CheckForSerializableConflictOut(), predicatelock_twophase_recover(), PredicateLockShmemInit(), PredicateLockTwoPhaseFinish(), RegisterPredicateLockingXid(), and ReleaseOneSerializableXact().
|
static |
Definition at line 325 of file predicate.c.