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:543
void ExecParallelHashTableInsert(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1838
void ExecParallelHashTableSetCurrentBatch(HashJoinTable hashtable, int batchno)
Definition: nodeHash.c:3498
void ExecHashTableReset(HashJoinTable hashtable)
Definition: nodeHash.c:2326
void ExecHashInitializeDSM(HashState *node, ParallelContext *pcxt)
Definition: nodeHash.c:2779
bool ExecParallelScanHashBucket(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:2052
void ExecHashAccumInstrumentation(HashInstrumentation *instrument, HashJoinTable hashtable)
Definition: nodeHash.c:2876
void ExecHashInitializeWorker(HashState *node, ParallelWorkerContext *pwcxt)
Definition: nodeHash.c:2804
Node * MultiExecHash(HashState *node)
Definition: nodeHash.c:104
HashState * ExecInitHash(Hash *node, EState *estate, int eflags)
Definition: nodeHash.c:369
void ExecHashTableDetachBatch(HashJoinTable hashtable)
Definition: nodeHash.c:3308
void ExecHashEstimate(HashState *node, ParallelContext *pcxt)
Definition: nodeHash.c:2760
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:657
void ExecPrepHashTableForUnmatched(HashJoinState *hjstate)
Definition: nodeHash.c:2103
void ExecHashTableDetach(HashJoinTable hashtable)
Definition: nodeHash.c:3400
bool ExecParallelScanHashTableForUnmatched(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:2263
void ExecHashTableDestroy(HashJoinTable hashtable)
Definition: nodeHash.c:955
HashJoinTable ExecHashTableCreate(HashState *state)
Definition: nodeHash.c:445
int ExecHashGetSkewBucket(HashJoinTable hashtable, uint32 hashvalue)
Definition: nodeHash.c:2554
bool ExecScanHashTableForUnmatched(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:2189
void ExecHashTableResetMatchFlags(HashJoinTable hashtable)
Definition: nodeHash.c:2354
void ExecEndHash(HashState *node)
Definition: nodeHash.c:426
void ExecShutdownHash(HashState *node)
Definition: nodeHash.c:2830
void ExecHashTableInsert(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1748
void ExecHashGetBucketAndBatch(HashJoinTable hashtable, uint32 hashvalue, int *bucketno, int *batchno)
Definition: nodeHash.c:1959
void ExecParallelHashTableAlloc(HashJoinTable hashtable, int batchno)
Definition: nodeHash.c:3288
bool ExecParallelPrepHashTableForUnmatched(HashJoinState *hjstate)
Definition: nodeHash.c:2124
void ExecParallelHashTableInsertCurrentBatch(HashJoinTable hashtable, TupleTableSlot *slot, uint32 hashvalue)
Definition: nodeHash.c:1904
void ExecReScanHash(HashState *node)
Definition: nodeHash.c:2380
bool ExecScanHashBucket(HashJoinState *hjstate, ExprContext *econtext)
Definition: nodeHash.c:1991
void ExecHashRetrieveInstrumentation(HashState *node)
Definition: nodeHash.c:2845
Definition: nodes.h:135
Definition: regguts.h:323