mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-07 01:17:34 +08:00
Previously, executor nodes running in parallel worker processes didn't have access to the dsm_segment object used for parallel execution. In order to support resource management based on DSM segment lifetime, they need that. So create a ParallelWorkerContext object to hold it and pass it to all InitializeWorker functions. Author: Thomas Munro Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CAEepm=2W=cOkiZxcg6qiFQP-dHUe09aqTrEMM7yJDrHMhDv_RA@mail.gmail.com
34 lines
1.1 KiB
C
34 lines
1.1 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* nodeSort.h
|
|
*
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* src/include/executor/nodeSort.h
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef NODESORT_H
|
|
#define NODESORT_H
|
|
|
|
#include "access/parallel.h"
|
|
#include "nodes/execnodes.h"
|
|
|
|
extern SortState *ExecInitSort(Sort *node, EState *estate, int eflags);
|
|
extern void ExecEndSort(SortState *node);
|
|
extern void ExecSortMarkPos(SortState *node);
|
|
extern void ExecSortRestrPos(SortState *node);
|
|
extern void ExecReScanSort(SortState *node);
|
|
|
|
/* parallel instrumentation support */
|
|
extern void ExecSortEstimate(SortState *node, ParallelContext *pcxt);
|
|
extern void ExecSortInitializeDSM(SortState *node, ParallelContext *pcxt);
|
|
extern void ExecSortReInitializeDSM(SortState *node, ParallelContext *pcxt);
|
|
extern void ExecSortInitializeWorker(SortState *node, ParallelWorkerContext *pwcxt);
|
|
extern void ExecSortRetrieveInstrumentation(SortState *node);
|
|
|
|
#endif /* NODESORT_H */
|