|
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 "storage/shmem.h"#include "storage/subsystems.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 263 of file predicate.c.
| #define PredicateLockHashCodeFromTargetHashCode | ( | predicatelocktag, | |
| targethash | |||
| ) |
Definition at line 315 of file predicate.c.
| #define PredicateLockHashPartition | ( | hashcode | ) | ((hashcode) % NUM_PREDICATELOCK_PARTITIONS) |
Definition at line 255 of file predicate.c.
| #define PredicateLockHashPartitionLock | ( | hashcode | ) |
Definition at line 257 of file predicate.c.
| #define PredicateLockHashPartitionLockByIndex | ( | i | ) | (&MainLWLockArray[PREDICATELOCK_MANAGER_LWLOCK_OFFSET + (i)].lock) |
Definition at line 260 of file predicate.c.
| #define PredicateLockTargetTagHashCode | ( | predicatelocktargettag | ) | get_hash_value(PredicateLockTargetHash, predicatelocktargettag) |
Definition at line 302 of file predicate.c.
| #define SERIAL_ENTRIESPERPAGE (SERIAL_PAGESIZE / SERIAL_ENTRYSIZE) |
Definition at line 332 of file predicate.c.
| #define SERIAL_ENTRYSIZE sizeof(SerCommitSeqNo) |
Definition at line 331 of file predicate.c.
| #define SERIAL_MAX_PAGE (MaxTransactionId / SERIAL_ENTRIESPERPAGE) |
Definition at line 337 of file predicate.c.
Definition at line 330 of file predicate.c.
| #define SerialNextPage | ( | page | ) | (((page) >= SERIAL_MAX_PAGE) ? 0 : (page) + 1) |
Definition at line 339 of file predicate.c.
| #define SerialPage | ( | xid | ) | (((uint32) (xid)) / SERIAL_ENTRIESPERPAGE) |
Definition at line 345 of file predicate.c.
| #define SerialSlruCtl (&SerialSlruDesc) |
Definition at line 328 of file predicate.c.
Definition at line 341 of file predicate.c.
| #define SxactHasConflictOut | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_CONFLICT_OUT) != 0) |
Definition at line 288 of file predicate.c.
| #define SxactHasSummaryConflictIn | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_SUMMARY_CONFLICT_IN) != 0) |
Definition at line 281 of file predicate.c.
| #define SxactHasSummaryConflictOut | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_SUMMARY_CONFLICT_OUT) != 0) |
Definition at line 282 of file predicate.c.
| #define SxactIsCommitted | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_COMMITTED) != 0) |
Definition at line 276 of file predicate.c.
| #define SxactIsDeferrableWaiting | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_DEFERRABLE_WAITING) != 0) |
Definition at line 289 of file predicate.c.
| #define SxactIsDoomed | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_DOOMED) != 0) |
Definition at line 279 of file predicate.c.
| #define SxactIsOnFinishedList | ( | sxact | ) | (!dlist_node_is_detached(&(sxact)->finishedLink)) |
Definition at line 266 of file predicate.c.
| #define SxactIsPartiallyReleased | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_PARTIALLY_RELEASED) != 0) |
Definition at line 292 of file predicate.c.
| #define SxactIsPrepared | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_PREPARED) != 0) |
Definition at line 277 of file predicate.c.
| #define SxactIsReadOnly | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_READ_ONLY) != 0) |
Definition at line 280 of file predicate.c.
| #define SxactIsRolledBack | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_ROLLED_BACK) != 0) |
Definition at line 278 of file predicate.c.
| #define SxactIsROSafe | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_RO_SAFE) != 0) |
Definition at line 290 of file predicate.c.
| #define SxactIsROUnsafe | ( | sxact | ) | (((sxact)->flags & SXACT_FLAG_RO_UNSAFE) != 0) |
Definition at line 291 of file predicate.c.
| #define TargetTagIsCoveredBy | ( | covered_target, | |
| covering_target | |||
| ) |
Definition at line 232 of file predicate.c.
| typedef struct SerialControlData* SerialControl |
Definition at line 354 of file predicate.c.
Definition at line 4720 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 4986 of file predicate.c.
References Assert, CreateLocalPredicateLockHash(), InvalidSerializableXact, and MySerializableXact.
Referenced by ParallelWorkerMain().
Definition at line 828 of file predicate.c.
References check_slru_buffers(), and newval.
|
static |
Definition at line 2256 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 4266 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 3953 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 3921 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 1022 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 4349 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 4096 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 3627 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 2041 of file predicate.c.
References fb(), GetParentPredicateLockTag(), and PredicateLockExists().
Referenced by PredicateLockAcquire().
Definition at line 1870 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 2383 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 596 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 2321 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 2144 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 2599 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 2867 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 4431 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 713 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 2002 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 1377 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 1488 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 1558 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 1612 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 1694 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 2219 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 4466 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 1938 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 4789 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 4633 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 1351 of file predicate.c.
References Assert, fb(), PredicateLockHashCodeFromTargetHashCode, and PredicateLockTargetTagHashCode.
Referenced by PredicateLockShmemRequest().
| void predicatelock_twophase_recover | ( | FullTransactionId | fxid, |
| uint16 | info, | ||
| void * | recdata, | ||
| uint32 | len | ||
| ) |
Definition at line 4839 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 2447 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 1975 of file predicate.c.
References fb(), HASH_FIND, hash_search(), LOCALPREDICATELOCK::held, and LocalPredicateLockHash.
Referenced by CoarserLockCovers(), PredicateLockAcquire(), and PredicateLockTID().
Definition at line 512 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 2529 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 3159 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 3074 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 2506 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 1328 of file predicate.c.
References OldCommittedSxact, PredXactListData::OldCommittedSxact, PredicateLockHashPartitionLock, PredicateLockTargetTagHashCode, PredXact, ScratchPartitionLock, ScratchTargetTag, and ScratchTargetTagHash.
Definition at line 1244 of file predicate.c.
References PredXactListData::activeList, Assert, PredXactListData::availableList, RWConflictPoolHeaderData::availableList, PredXactListData::CanPartialClearThrough, SERIALIZABLEXACT::commitSeqNo, CreatePredXact(), dlist_init(), dlist_node_init(), dlist_push_tail(), PredXactListData::element, RWConflictPoolHeaderData::element, fb(), SERIALIZABLEXACT::finishedBefore, SERIALIZABLEXACT::finishedLink, FinishedSerializableTransactions, FirstNormalSerCommitSeqNo, SERIALIZABLEXACT::flags, HASH_ENTER, hash_search(), PredXactListData::HavePartialClearedThrough, SerialControlData::headPage, SerialControlData::headXid, i, SERIALIZABLEXACT::inConflicts, INVALID_PROC_NUMBER, InvalidTransactionId, SERIALIZABLEXACT::lastCommitBeforeSnapshot, PredXactListData::LastSxactCommitSeqNo, LW_EXCLUSIVE, LWLockAcquire(), LWLockInitialize(), LWLockRelease(), max_serializable_xacts, OldCommittedSxact, PredXactListData::OldCommittedSxact, SERIALIZABLEXACT::outConflicts, RWConflictData::outLink, SERIALIZABLEXACT::perXactPredicateListLock, SERIALIZABLEXACT::pgprocno, SERIALIZABLEXACT::pid, SERIALIZABLEXACT::possibleUnsafeConflicts, PredicateLockHashPartitionLock, SERIALIZABLEXACT::predicateLocks, PredicateLockTargetHash, PredicateLockTargetTagHashCode, PredXact, PredXactListDataSize, SERIALIZABLEXACT::prepareSeqNo, RWConflictPool, RWConflictPoolHeaderDataSize, ScratchPartitionLock, ScratchTargetTag, ScratchTargetTagHash, SERIALIZABLEXACT::SeqNo, SERIAL_ENTRIESPERPAGE, serialControl, SerialSlruCtl, SetInvalidVirtualTransactionId, SlruPagePrecedesUnitTests, SXACT_FLAG_COMMITTED, PredXactListData::SxactGlobalXmin, PredXactListData::SxactGlobalXminCount, SerialControlData::tailXid, SERIALIZABLEXACT::topXid, SERIALIZABLEXACT::vxid, PredXactListData::WritableSxactCount, SERIALIZABLEXACT::xactLink, and SERIALIZABLEXACT::xmin.
Definition at line 1119 of file predicate.c.
References add_size(), fb(), FinishedSerializableTransactions, HASH_BLOBS, HASH_ELEM, HASH_FIXED_SIZE, HASH_FUNCTION, HASH_PARTITION, HTAB::keysize, max_prepared_xacts, max_serializable_xacts, MaxBackends, mul_size(), name, NPREDICATELOCKTARGETENTS, NUM_PREDICATELOCK_PARTITIONS, predicatelock_hash(), PredicateLockHash, PredicateLockTargetHash, PredXact, PredXactListDataSize, RWConflictDataSize, RWConflictPool, RWConflictPoolHeaderDataSize, serial_errdetail_for_io_error(), serialControl, serializable_buffers, SerializableXidHash, SerialPagePrecedesLogically(), SerialSlruDesc, ShmemRequestHash, ShmemRequestStruct, SimpleLruRequest, and SYNC_HANDLER_NONE.
| void PredicateLockTID | ( | Relation | relation, |
| const ItemPointerData * | tid, | ||
| Snapshot | snapshot, | ||
| TransactionId | tuple_xid | ||
| ) |
Definition at line 2551 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 4812 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 1889 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 3765 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 3242 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 3609 of file predicate.c.
References fb(), hash_destroy(), InvalidSerializableXact, LocalPredicateLockHash, MySerializableXact, and MyXactDidWrite.
Referenced by ReleasePredicateLocks().
|
static |
Definition at line 610 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 705 of file predicate.c.
References RWConflictPoolHeaderData::availableList, dlist_delete(), dlist_push_tail(), fb(), and RWConflictPool.
Referenced by FlagSxactUnsafe(), ReleaseOneSerializableXact(), and ReleasePredicateLocks().
Definition at line 2070 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 2113 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 2091 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 624 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 760 of file predicate.c.
References errdetail(), and fb().
Referenced by PredicateLockShmemRequest().
|
static |
Definition at line 839 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 930 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 530 of file predicate.c.
References InvalidSerializableXact, IsMVCCSnapshot, MySerializableXact, PredicateLockingNeededForRelation(), ReleasePredicateLocks(), and SxactIsROSafe.
Referenced by CheckForSerializableConflictOut(), CheckForSerializableConflictOutNeeded(), PredicateLockPage(), PredicateLockRelation(), and PredicateLockTID().
Definition at line 574 of file predicate.c.
References InvalidSerializableXact, MySerializableXact, and PredicateLockingNeededForRelation().
Referenced by CheckForSerializableConflictIn(), and CheckTableForSerializableConflictIn().
Definition at line 745 of file predicate.c.
References fb(), FirstNormalTransactionId, SERIAL_ENTRIESPERPAGE, and TransactionIdPrecedes().
Referenced by CheckPointPredicate(), PredicateLockShmemRequest(), and SerialAdd().
|
static |
Definition at line 971 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 3181 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 680 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 657 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 1652 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 4977 of file predicate.c.
References MySerializableXact.
Referenced by InitializeParallelDSM().
Definition at line 1433 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 3053 of file predicate.c.
References DropAllPredicateLocksFromTable().
Referenced by ATRewriteTable(), cluster_rel(), index_concurrently_set_dead(), index_drop(), rebuild_relation_finish_concurrent(), and reindex_index().
|
static |
Definition at line 2660 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 3902 of file predicate.c.
References Assert, fb(), GetTopTransactionIdIfAny(), GetTransactionSnapshot(), pg_lfind32(), TransactionIdEquals, TransactionIdFollowsOrEquals(), TransactionIdIsValid, and TransactionIdPrecedes().
Referenced by CheckForSerializableConflictOut().
|
static |
Definition at line 412 of file predicate.c.
Referenced by ClearOldPredicateLocks(), PredicateLockShmemInit(), PredicateLockShmemRequest(), ReleasePredicateLocks(), and SummarizeOldestCommittedSxact().
Definition at line 427 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 375 of file predicate.c.
Referenced by MaxPredicateChildLocks().
| int max_predicate_locks_per_relation |
Definition at line 374 of file predicate.c.
Referenced by MaxPredicateChildLocks().
| int max_predicate_locks_per_xact |
Definition at line 373 of file predicate.c.
Referenced by CreateLocalPredicateLockHash(), and MaxPredicateChildLocks().
|
static |
Definition at line 446 of file predicate.c.
Referenced by PredicateLockShmemInit(), and PredicateLockShmemRequest().
|
static |
Definition at line 434 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 435 of file predicate.c.
Referenced by CheckForSerializableConflictIn(), CheckTableForSerializableConflictIn(), GetSerializableTransactionSnapshotInt(), PostPrepare_PredicateLocks(), PredicateLockTwoPhaseFinish(), ReleasePredicateLocks(), and ReleasePredicateLocksLocal().
|
static |
Definition at line 364 of file predicate.c.
Referenced by ClearOldPredicateLocks(), DropAllPredicateLocksFromTable(), FlagRWConflict(), PredicateLockShmemAttach(), PredicateLockShmemInit(), ReleaseOneSerializableXact(), SetNewSxactGlobalXmin(), and TransferPredicateLocksToNewTarget().
|
static |
Definition at line 411 of file predicate.c.
Referenced by CheckTargetForConflictsIn(), ClearOldPredicateLocks(), CreatePredicateLock(), DeleteChildTargetLocks(), DeleteLockTarget(), DropAllPredicateLocksFromTable(), GetPredicateLockStatusData(), PredicateLockShmemRequest(), ReleaseOneSerializableXact(), and TransferPredicateLocksToNewTarget().
| const ShmemCallbacks PredicateLockShmemCallbacks |
Definition at line 392 of file predicate.c.
|
static |
Definition at line 410 of file predicate.c.
Referenced by CheckTableForSerializableConflictIn(), CheckTargetForConflictsIn(), CreatePredicateLock(), DropAllPredicateLocksFromTable(), PageIsPredicateLocked(), PredicateLockShmemInit(), PredicateLockShmemRequest(), RemoveScratchTarget(), RemoveTargetIfNoLongerUsed(), RestoreScratchTarget(), and TransferPredicateLocksToNewTarget().
|
static |
Definition at line 386 of file predicate.c.
Referenced by CheckTableForSerializableConflictIn(), ClearOldPredicateLocks(), CreatePredXact(), DropAllPredicateLocksFromTable(), GetSafeSnapshotBlockingPids(), GetSerializableTransactionSnapshotInt(), PreCommit_CheckForSerializationFailure(), predicatelock_twophase_recover(), PredicateLockPageSplit(), PredicateLockShmemAttach(), PredicateLockShmemInit(), PredicateLockShmemRequest(), ReleasePredicateLocks(), ReleasePredXact(), and SetNewSxactGlobalXmin().
|
static |
Definition at line 403 of file predicate.c.
Referenced by PredicateLockShmemInit(), PredicateLockShmemRequest(), ReleaseRWConflict(), SetPossibleUnsafeConflict(), and SetRWConflict().
|
static |
Definition at line 444 of file predicate.c.
Referenced by ReleasePredicateLocks().
|
static |
Definition at line 421 of file predicate.c.
Referenced by PredicateLockShmemAttach(), PredicateLockShmemInit(), RemoveScratchTarget(), and RestoreScratchTarget().
|
static |
Definition at line 419 of file predicate.c.
Referenced by PredicateLockShmemAttach(), PredicateLockShmemInit(), RemoveScratchTarget(), and RestoreScratchTarget().
|
static |
Definition at line 420 of file predicate.c.
Referenced by PredicateLockShmemAttach(), PredicateLockShmemInit(), RemoveScratchTarget(), and RestoreScratchTarget().
|
static |
Definition at line 356 of file predicate.c.
Referenced by CheckPointPredicate(), PredicateLockShmemInit(), PredicateLockShmemRequest(), SerialAdd(), SerialGetMinConflictCommitSeqNo(), and SerialSetActiveSerXmin().
|
static |
Definition at line 409 of file predicate.c.
Referenced by CheckForSerializableConflictOut(), predicatelock_twophase_recover(), PredicateLockShmemRequest(), PredicateLockTwoPhaseFinish(), RegisterPredicateLockingXid(), and ReleaseOneSerializableXact().
|
static |
Definition at line 326 of file predicate.c.
Referenced by PredicateLockShmemRequest().