openGauss资源池化支持多机并行

This commit is contained in:
quemingjian
2023-10-12 18:39:23 +08:00
parent c1aaeea5b2
commit ea7ff3627b
140 changed files with 10069 additions and 353 deletions

View File

@ -0,0 +1,28 @@
/* -------------------------------------------------------------------------
*
* nodeAssertOp.h
*
*
* Portions Copyright (c) 2023 Huawei Technologies Co.,Ltd.
* Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/executor/nodeAssertOp.h
*
* -------------------------------------------------------------------------
*/
#ifndef NODEASSERTOP_H
#define NODEASSERTOP_H
#ifdef USE_SPQ
#include "nodes/execnodes.h"
extern void ExecAssertOpExplainEnd(PlanState *planstate, struct StringInfoData *buf);
extern TupleTableSlot* ExecAssertOp(PlanState *node);
extern AssertOpState* ExecInitAssertOp(AssertOp *node, EState *estate, int eflags);
extern void ExecEndAssertOp(AssertOpState *node);
extern void ExecReScanAssertOp(AssertOpState *node);
#endif /* USE_SPQ */
#endif /* NODEASSERTOP_H */

View File

@ -29,6 +29,10 @@ extern HashJoinTable ExecHashTableCreate(Hash* node, List* hashOperators, bool k
extern void ExecHashTableDestroy(HashJoinTable hashtable);
extern void ExecHashTableInsert(HashJoinTable hashtable, TupleTableSlot* slot, uint32 hashvalue, int planid, int dop,
Instrumentation* instrument = NULL);
#ifdef USE_SPQ
extern bool ExecHashGetHashValue(HashJoinTable hashtable, ExprContext* econtext, List* hashkeys, bool outer_tuple,
bool keep_nulls, uint32* hashvalue, bool *hashkeys_null);
#endif
extern bool ExecHashGetHashValue(HashJoinTable hashtable, ExprContext* econtext, List* hashkeys, bool outer_tuple,
bool keep_nulls, uint32* hashvalue);
extern void ExecHashGetBucketAndBatch(HashJoinTable hashtable, uint32 hashvalue, int* bucketno, int* batchno);

View File

@ -0,0 +1,29 @@
/*-------------------------------------------------------------------------
*
* nodeSequence.h
* header file for nodeSequence.cpp.
*
* Portions Copyright (c) 2023 Huawei Technologies Co.,Ltd.
* Portions Copyright (c) 2012 - 2022, EMC/Greenplum
* Portions Copyright (c) 2012-Present VMware, Inc. or its affiliates.
*
*
* IDENTIFICATION
* src/include/executor/node/nodeSequence.h
*
*-------------------------------------------------------------------------
*/
#ifndef NODESEQUENCE_H
#define NODESEQUENCE_H
#ifdef USE_SPQ
#include "executor/tuptable.h"
#include "nodes/execnodes.h"
extern SequenceState *ExecInitSequence(Sequence *node, EState *estate, int eflags);
extern TupleTableSlot *ExecSequence(PlanState *pstate);
extern void ExecReScanSequence(SequenceState *node);
extern void ExecEndSequence(SequenceState *node);
#endif /* USE_SPQ */
#endif

View File

@ -0,0 +1,38 @@
/*-------------------------------------------------------------------------
*
* nodeShareInputScan.h
*
* Portions Copyright (c) 2023 Huawei Technologies Co.,Ltd.
* Portions Copyright (c) 2012-2021 VMware, Inc. or its affiliates.
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* src/include/executor/node/nodeShareInputScan.h
*
*-------------------------------------------------------------------------
*/
#ifndef NODESHAREINPUTSCAN_H
#define NODESHAREINPUTSCAN_H
#ifdef USE_SPQ
#include "nodes/execnodes.h"
#include "storage/sharedfileset.h"
extern ShareInputScanState *ExecInitShareInputScan(ShareInputScan *node, EState *estate, int eflags);
extern void ExecEndShareInputScan(ShareInputScanState *node);
extern void ExecReScanShareInputScan(ShareInputScanState *node);
extern TupleTableSlot *ExecShareInputScan(PlanState *pstate);
extern Size ShareInputShmemSize(void);
extern void ShareInputShmemInit(void);
extern SharedFileSet *get_shareinput_fileset(void);
extern void tuplestore_make_shared(Tuplestorestate *state, SharedFileSet *fileset, const char *filename);
extern void tuplestore_freeze(Tuplestorestate *state);
extern Tuplestorestate *tuplestore_open_shared(SharedFileSet *fileset, const char *filename);
#endif /* USE_SPQ */
#endif /* NODESHAREINPUTSCAN_H */

View File

@ -0,0 +1,32 @@
/* -------------------------------------------------------------------------
*
* nodeSpqSeqscan.h
*
* Portions Copyright (c) 2023 Huawei Technologies Co.,Ltd.
*
* src/include/executor/node/nodeSpqSeqscan.h
*
* -------------------------------------------------------------------------
*/
#ifdef USE_SPQ
#ifndef NODESPQSEQSCAN_H
#define NODESPQSEQSCAN_H
#include "nodes/execnodes.h"
typedef SpqSeqScanState* (*init_spqscan_hook_type)(SpqSeqScan* node, EState* estate, int eflags);
typedef TupleTableSlot* (*exec_spqscan_hook_type)(PlanState* node);
typedef void (*end_spqscan_hook_type)(SpqSeqScanState* node);
typedef void (*spqscan_rescan_hook_type)(SpqSeqScanState* node);
extern THR_LOCAL init_spqscan_hook_type init_spqscan_hook;
extern THR_LOCAL exec_spqscan_hook_type exec_spqscan_hook;
extern THR_LOCAL end_spqscan_hook_type end_spqscan_hook;
extern THR_LOCAL spqscan_rescan_hook_type spqscan_rescan_hook;
// unchanged function compare with seqscan
extern void ExecSpqSeqMarkPos(SpqSeqScanState* node);
extern void ExecSpqSeqRestrPos(SpqSeqScanState* node);
#endif // NODESPQSEQSCAN_H
#endif