73 #define CCID_HASH_SIZE 100 85 #define CCID_ARRAY_SIZE 100 215 if (comboHash == NULL)
269 comboCids[combocid].
cmin = cmin;
270 comboCids[combocid].
cmax = cmax;
282 return comboCids[combocid].
cmin;
289 return comboCids[combocid].
cmax;
324 endptr = start_address +
sizeof(int) +
326 if (endptr < start_address || endptr > start_address + maxsize)
327 elog(
ERROR,
"not enough space to serialize ComboCID state");
331 memcpy(start_address +
sizeof(
int), comboCids,
349 Assert(!comboCids && !comboHash);
352 num_elements = *(
int *) comboCIDstate;
356 for (i = 0; i < num_elements; i++)
362 elog(
ERROR,
"unexpected command ID while restoring combo CIDs");
#define HeapTupleHeaderGetUpdateXid(tup)
MemoryContext TopTransactionContext
bool TransactionIdIsCurrentTransactionId(TransactionId xid)
CommandId HeapTupleHeaderGetCmin(HeapTupleHeader tup)
void * hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr)
void RestoreComboCIDState(char *comboCIDstate)
static ComboCidKey comboCids
#define HeapTupleHeaderXminCommitted(tup)
static CommandId GetComboCommandId(CommandId cmin, CommandId cmax)
static CommandId GetRealCmin(CommandId combocid)
HTAB * hash_create(const char *tabname, long nelem, const HASHCTL *info, int flags)
Size EstimateComboCIDStateSpace(void)
volatile uint32 CritSectionCount
ComboCidKeyData * ComboCidKey
static CommandId GetRealCmax(CommandId combocid)
Size mul_size(Size s1, Size s2)
Size add_size(Size s1, Size s2)
void AtEOXact_ComboCid(void)
#define Assert(condition)
CommandId HeapTupleHeaderGetCmax(HeapTupleHeader tup)
#define HeapTupleHeaderGetXmin(tup)
#define HeapTupleHeaderGetRawXmin(tup)
void * repalloc(void *pointer, Size size)
void HeapTupleHeaderAdjustCmax(HeapTupleHeader tup, CommandId *cmax, bool *iscombo)
#define HeapTupleHeaderGetRawCommandId(tup)
void * MemoryContextAlloc(MemoryContext context, Size size)
void SerializeComboCIDState(Size maxsize, char *start_address)
ComboCidEntryData * ComboCidEntry