|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "access/xact.h"#include "miscadmin.h"#include "storage/shmem.h"#include "utils/combocid.h"#include "utils/hsearch.h"#include "utils/memutils.h"
Go to the source code of this file.
Data Structures | |
| struct | ComboCidKeyData |
| struct | ComboCidEntryData |
Macros | |
| #define | CCID_HASH_SIZE 100 |
| #define | CCID_ARRAY_SIZE 100 |
Typedefs | |
| typedef ComboCidKeyData * | ComboCidKey |
| typedef ComboCidEntryData * | ComboCidEntry |
Functions | |
| static CommandId | GetComboCommandId (CommandId cmin, CommandId cmax) |
| static CommandId | GetRealCmin (CommandId combocid) |
| static CommandId | GetRealCmax (CommandId combocid) |
| CommandId | HeapTupleHeaderGetCmin (const HeapTupleHeaderData *tup) |
| CommandId | HeapTupleHeaderGetCmax (const HeapTupleHeaderData *tup) |
| void | HeapTupleHeaderAdjustCmax (const HeapTupleHeaderData *tup, CommandId *cmax, bool *iscombo) |
| void | AtEOXact_ComboCid (void) |
| Size | EstimateComboCIDStateSpace (void) |
| void | SerializeComboCIDState (Size maxsize, char *start_address) |
| void | RestoreComboCIDState (char *comboCIDstate) |
Variables | |
| static HTAB * | comboHash = NULL |
| static ComboCidKey | comboCids = NULL |
| static int | usedComboCids = 0 |
| static int | sizeComboCids = 0 |
| #define CCID_ARRAY_SIZE 100 |
Definition at line 85 of file combocid.c.
| #define CCID_HASH_SIZE 100 |
Definition at line 73 of file combocid.c.
| typedef ComboCidEntryData* ComboCidEntry |
Definition at line 70 of file combocid.c.
| typedef ComboCidKeyData* ComboCidKey |
Definition at line 62 of file combocid.c.
| void AtEOXact_ComboCid | ( | void | ) |
Definition at line 182 of file combocid.c.
References comboCids, comboHash, sizeComboCids, and usedComboCids.
Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().
| Size EstimateComboCIDStateSpace | ( | void | ) |
Definition at line 297 of file combocid.c.
References add_size(), mul_size(), and usedComboCids.
Referenced by InitializeParallelDSM().
Definition at line 204 of file combocid.c.
References CCID_ARRAY_SIZE, CCID_HASH_SIZE, ComboCidKeyData::cmax, ComboCidKeyData::cmin, ComboCidEntryData::combocid, comboCids, comboHash, HASHCTL::entrysize, HASH_BLOBS, HASH_CONTEXT, hash_create(), HASH_ELEM, HASH_ENTER, hash_search(), HASHCTL::hcxt, sort-test::key, HASHCTL::keysize, MemoryContextAlloc(), repalloc(), sizeComboCids, TopTransactionContext, and usedComboCids.
Referenced by HeapTupleHeaderAdjustCmax(), and RestoreComboCIDState().
Definition at line 286 of file combocid.c.
References Assert(), ComboCidKeyData::cmax, comboCids, and usedComboCids.
Referenced by HeapTupleHeaderGetCmax().
Definition at line 279 of file combocid.c.
References Assert(), ComboCidKeyData::cmin, comboCids, and usedComboCids.
Referenced by HeapTupleHeaderGetCmin().
| void HeapTupleHeaderAdjustCmax | ( | const HeapTupleHeaderData * | tup, |
| CommandId * | cmax, | ||
| bool * | iscombo | ||
| ) |
Definition at line 153 of file combocid.c.
References GetComboCommandId(), HeapTupleHeaderGetCmin(), HeapTupleHeaderGetRawXmin(), HeapTupleHeaderXminCommitted(), and TransactionIdIsCurrentTransactionId().
Referenced by heap_delete(), and heap_update().
| CommandId HeapTupleHeaderGetCmax | ( | const HeapTupleHeaderData * | tup | ) |
Definition at line 118 of file combocid.c.
References Assert(), CritSectionCount, GetRealCmax(), HEAP_COMBOCID, HEAP_MOVED, HeapTupleHeaderGetRawCommandId(), HeapTupleHeaderGetUpdateXid(), HeapTupleHeaderData::t_infomask, and TransactionIdIsCurrentTransactionId().
Referenced by heap_delete(), heap_lock_tuple(), heap_update(), HeapTupleSatisfiesMVCC(), HeapTupleSatisfiesUpdate(), and log_heap_new_cid().
| CommandId HeapTupleHeaderGetCmin | ( | const HeapTupleHeaderData * | tup | ) |
Definition at line 104 of file combocid.c.
References Assert(), GetRealCmin(), HEAP_COMBOCID, HEAP_MOVED, HeapTupleHeaderGetRawCommandId(), HeapTupleHeaderGetXmin(), HeapTupleHeaderData::t_infomask, and TransactionIdIsCurrentTransactionId().
Referenced by heapam_tuple_lock(), HeapTupleHeaderAdjustCmax(), HeapTupleSatisfiesMVCC(), HeapTupleSatisfiesUpdate(), and log_heap_new_cid().
| void RestoreComboCIDState | ( | char * | comboCIDstate | ) |
Definition at line 342 of file combocid.c.
References Assert(), comboCids, comboHash, elog, ERROR, GetComboCommandId(), and i.
Referenced by ParallelWorkerMain().
| void SerializeComboCIDState | ( | Size | maxsize, |
| char * | start_address | ||
| ) |
Definition at line 316 of file combocid.c.
References comboCids, elog, ERROR, and usedComboCids.
Referenced by InitializeParallelDSM().
|
static |
Definition at line 80 of file combocid.c.
Referenced by AtEOXact_ComboCid(), GetComboCommandId(), GetRealCmax(), GetRealCmin(), RestoreComboCIDState(), and SerializeComboCIDState().
|
static |
Definition at line 53 of file combocid.c.
Referenced by AtEOXact_ComboCid(), GetComboCommandId(), and RestoreComboCIDState().
|
static |
Definition at line 82 of file combocid.c.
Referenced by AtEOXact_ComboCid(), and GetComboCommandId().
|
static |
Definition at line 81 of file combocid.c.
Referenced by AtEOXact_ComboCid(), EstimateComboCIDStateSpace(), GetComboCommandId(), GetRealCmax(), GetRealCmin(), and SerializeComboCIDState().