PostgreSQL Source Code  git master
nodeHash.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * nodeHash.h
4  * prototypes for nodeHash.c
5  *
6  *
7  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/executor/nodeHash.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef NODEHASH_H
15 #define NODEHASH_H
16 
17 #include "access/parallel.h"
18 #include "nodes/execnodes.h"
19 
20 struct SharedHashJoinBatch;
21 
22 extern HashState *ExecInitHash(Hash *node, EState *estate, int eflags);
23 extern Node *MultiExecHash(HashState *node);
24 extern void ExecEndHash(HashState *node);
25 extern void ExecReScanHash(HashState *node);
26 
28 extern void ExecParallelHashTableAlloc(HashJoinTable hashtable,
29  int batchno);
30 extern void ExecHashTableDestroy(HashJoinTable hashtable);
31 extern void ExecHashTableDetach(HashJoinTable hashtable);
32 extern void ExecHashTableDetachBatch(HashJoinTable hashtable);
34  int batchno);
35 
36 extern void ExecHashTableInsert(HashJoinTable hashtable,
37  TupleTableSlot *slot,
38  uint32 hashvalue);
39 extern void ExecParallelHashTableInsert(HashJoinTable hashtable,
40  TupleTableSlot *slot,
41  uint32 hashvalue);
43  TupleTableSlot *slot,
44  uint32 hashvalue);
45 extern void ExecHashGetBucketAndBatch(HashJoinTable hashtable,
46  uint32 hashvalue,
47  int *bucketno,
48  int *batchno);
49 extern bool ExecScanHashBucket(HashJoinState *hjstate, ExprContext *econtext);
50 extern bool ExecParallelScanHashBucket(HashJoinState *hjstate, ExprContext *econtext);
51 extern void ExecPrepHashTableForUnmatched(HashJoinState *hjstate);
53 extern bool ExecScanHashTableForUnmatched(HashJoinState *hjstate,
54  ExprContext *econtext);
56  ExprContext *econtext);
57 extern void ExecHashTableReset(HashJoinTable hashtable);
58 extern void ExecHashTableResetMatchFlags(HashJoinTable hashtable);
59 extern void ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew,
60  bool try_combined_hash_mem,
61  int parallel_workers,
62  size_t *space_allowed,
63  int *numbuckets,
64  int *numbatches,
65  int *num_skew_mcvs);
66 extern int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue);
67 extern void ExecHashEstimate(HashState *node, ParallelContext *pcxt);
68 extern void ExecHashInitializeDSM(HashState *node, ParallelContext *pcxt);
71 extern void ExecShutdownHash(HashState *node);
73  HashJoinTable hashtable);
74 
75 #endif /* NODEHASH_H */
unsigned int uint32
Definition: c.h:506
void ExecParallelHashTableInsert(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1704
void ExecParallelHashTableSetCurrentBatch(HashJoinTable hashtable, int batchno)
Definition: nodeHash.c:3364
void ExecHashTableReset(HashJoinTable hashtable)
Definition: nodeHash.c:2192
void ExecHashInitializeDSM(HashState *node, ParallelContext *pcxt)
Definition: nodeHash.c:2645
bool ExecParallelScanHashBucket(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:1918
void ExecHashAccumInstrumentation(HashInstrumentation *instrument, HashJoinTable hashtable)
Definition: nodeHash.c:2742
void ExecHashInitializeWorker(HashState *node, ParallelWorkerContext *pwcxt)
Definition: nodeHash.c:2670
void ExecHashTableDetachBatch(HashJoinTable hashtable)
Definition: nodeHash.c:3174
void ExecHashEstimate(HashState *node, ParallelContext *pcxt)
Definition: nodeHash.c:2626
HashState * ExecInitHash(Hash *node, EState *estate, int eflags)
Definition: nodeHash.c:370
void ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew, bool try_combined_hash_mem, int parallel_workers, size_t *space_allowed, int *numbuckets, int *numbatches, int *num_skew_mcvs)
Definition: nodeHash.c:658
void ExecPrepHashTableForUnmatched(HashJoinState *hjstate)
Definition: nodeHash.c:1969
void ExecHashTableDetach(HashJoinTable hashtable)
Definition: nodeHash.c:3266
bool ExecParallelScanHashTableForUnmatched(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:2129
void ExecHashTableDestroy(HashJoinTable hashtable)
Definition: nodeHash.c:866
HashJoinTable ExecHashTableCreate(HashState *state)
Definition: nodeHash.c:446
int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue)
Definition: nodeHash.c:2420
bool ExecScanHashTableForUnmatched(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:2055
void ExecHashTableResetMatchFlags(HashJoinTable hashtable)
Definition: nodeHash.c:2220
void ExecEndHash(HashState *node)
Definition: nodeHash.c:427
void ExecShutdownHash(HashState *node)
Definition: nodeHash.c:2696
void ExecHashTableInsert(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1614
void ExecHashGetBucketAndBatch(HashJoinTable hashtable, uint32 hashvalue, int *bucketno, int *batchno)
Definition: nodeHash.c:1825
void ExecParallelHashTableAlloc(HashJoinTable hashtable, int batchno)
Definition: nodeHash.c:3154
bool ExecParallelPrepHashTableForUnmatched(HashJoinState *hjstate)
Definition: nodeHash.c:1990
void ExecParallelHashTableInsertCurrentBatch(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1770
void ExecReScanHash(HashState *node)
Definition: nodeHash.c:2246
bool ExecScanHashBucket(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:1857
void ExecHashRetrieveInstrumentation(HashState *node)
Definition: nodeHash.c:2711
Node * MultiExecHash(HashState *node)
Definition: nodeHash.c:105
Definition: nodes.h:129
Definition: regguts.h:323