PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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:502
void ExecParallelHashTableInsert(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1833
void ExecParallelHashTableSetCurrentBatch(HashJoinTable hashtable, int batchno)
Definition: nodeHash.c:3493
void ExecHashTableReset(HashJoinTable hashtable)
Definition: nodeHash.c:2321
void ExecHashInitializeDSM(HashState *node, ParallelContext *pcxt)
Definition: nodeHash.c:2774
bool ExecParallelScanHashBucket(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:2047
void ExecHashAccumInstrumentation(HashInstrumentation *instrument, HashJoinTable hashtable)
Definition: nodeHash.c:2871
void ExecHashInitializeWorker(HashState *node, ParallelWorkerContext *pwcxt)
Definition: nodeHash.c:2799
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:3303
void ExecHashEstimate(HashState *node, ParallelContext *pcxt)
Definition: nodeHash.c:2755
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:2098
void ExecHashTableDetach(HashJoinTable hashtable)
Definition: nodeHash.c:3395
bool ExecParallelScanHashTableForUnmatched(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:2258
void ExecHashTableDestroy(HashJoinTable hashtable)
Definition: nodeHash.c:950
HashJoinTable ExecHashTableCreate(HashState *state)
Definition: nodeHash.c:446
int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue)
Definition: nodeHash.c:2549
bool ExecScanHashTableForUnmatched(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:2184
void ExecHashTableResetMatchFlags(HashJoinTable hashtable)
Definition: nodeHash.c:2349
void ExecEndHash(HashState *node)
Definition: nodeHash.c:427
void ExecShutdownHash(HashState *node)
Definition: nodeHash.c:2825
void ExecHashTableInsert(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1743
void ExecHashGetBucketAndBatch(HashJoinTable hashtable, uint32 hashvalue, int *bucketno, int *batchno)
Definition: nodeHash.c:1954
void ExecParallelHashTableAlloc(HashJoinTable hashtable, int batchno)
Definition: nodeHash.c:3283
bool ExecParallelPrepHashTableForUnmatched(HashJoinState *hjstate)
Definition: nodeHash.c:2119
void ExecParallelHashTableInsertCurrentBatch(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1899
void ExecReScanHash(HashState *node)
Definition: nodeHash.c:2375
bool ExecScanHashBucket(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:1986
void ExecHashRetrieveInstrumentation(HashState *node)
Definition: nodeHash.c:2840
Definition: nodes.h:135
Definition: regguts.h:323