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-2025, 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
20struct SharedHashJoinBatch;
21
22extern HashState *ExecInitHash(Hash *node, EState *estate, int eflags);
23extern Node *MultiExecHash(HashState *node);
24extern void ExecEndHash(HashState *node);
25extern void ExecReScanHash(HashState *node);
26
28extern void ExecParallelHashTableAlloc(HashJoinTable hashtable,
29 int batchno);
30extern void ExecHashTableDestroy(HashJoinTable hashtable);
31extern void ExecHashTableDetach(HashJoinTable hashtable);
32extern void ExecHashTableDetachBatch(HashJoinTable hashtable);
34 int batchno);
35
36extern void ExecHashTableInsert(HashJoinTable hashtable,
37 TupleTableSlot *slot,
38 uint32 hashvalue);
39extern void ExecParallelHashTableInsert(HashJoinTable hashtable,
40 TupleTableSlot *slot,
41 uint32 hashvalue);
43 TupleTableSlot *slot,
44 uint32 hashvalue);
45extern void ExecHashGetBucketAndBatch(HashJoinTable hashtable,
46 uint32 hashvalue,
47 int *bucketno,
48 int *batchno);
49extern bool ExecScanHashBucket(HashJoinState *hjstate, ExprContext *econtext);
50extern bool ExecParallelScanHashBucket(HashJoinState *hjstate, ExprContext *econtext);
54 ExprContext *econtext);
56 ExprContext *econtext);
57extern void ExecHashTableReset(HashJoinTable hashtable);
58extern void ExecHashTableResetMatchFlags(HashJoinTable hashtable);
59extern 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);
66extern int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue);
67extern void ExecHashEstimate(HashState *node, ParallelContext *pcxt);
68extern void ExecHashInitializeDSM(HashState *node, ParallelContext *pcxt);
71extern void ExecShutdownHash(HashState *node);
73 HashJoinTable hashtable);
74
75#endif /* NODEHASH_H */
uint32_t uint32
Definition: c.h:488
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
Node * MultiExecHash(HashState *node)
Definition: nodeHash.c:105
HashState * ExecInitHash(Hash *node, EState *estate, int eflags)
Definition: nodeHash.c:370
void ExecHashTableDetachBatch(HashJoinTable hashtable)
Definition: nodeHash.c:3174
void ExecHashEstimate(HashState *node, ParallelContext *pcxt)
Definition: nodeHash.c:2626
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
Definition: nodes.h:129
Definition: regguts.h:323