aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor/nodeSort.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2017-08-29 13:22:49 -0400
committerRobert Haas <rhaas@postgresql.org>2017-08-29 13:26:33 -0400
commitbf11e7ee2e3607bb67d25aec73aa53b2d7e9961b (patch)
tree89c3d26f157949896e1a69c1ea4f4ae5b64833ee /src/include/executor/nodeSort.h
parent3452dc5240da43e833118484e1e9b4894d04431c (diff)
downloadpostgresql-bf11e7ee2e3607bb67d25aec73aa53b2d7e9961b.tar.gz
postgresql-bf11e7ee2e3607bb67d25aec73aa53b2d7e9961b.zip
Propagate sort instrumentation from workers back to leader.
Up until now, when parallel query was used, no details about the sort method or space used by the workers were available; details were shown only for any sorting done by the leader. Fix that. Commit 1177ab1dabf72bafee8f19d904cee3a299f25892 forced the test case added by commit 1f6d515a67ec98194c23a5db25660856c9aab944 to run without parallelism; now that we have this infrastructure, allow that again, with a little tweaking to make it pass with and without force_parallel_mode. Robert Haas and Tom Lane Discussion: http://postgr.es/m/CA+Tgmoa2VBZW6S8AAXfhpHczb=Rf6RqQ2br+zJvEgwJ0uoD_tQ@mail.gmail.com
Diffstat (limited to 'src/include/executor/nodeSort.h')
-rw-r--r--src/include/executor/nodeSort.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/executor/nodeSort.h b/src/include/executor/nodeSort.h
index ed0e9dbb53e..77ac06597ff 100644
--- a/src/include/executor/nodeSort.h
+++ b/src/include/executor/nodeSort.h
@@ -14,6 +14,7 @@
#ifndef NODESORT_H
#define NODESORT_H
+#include "access/parallel.h"
#include "nodes/execnodes.h"
extern SortState *ExecInitSort(Sort *node, EState *estate, int eflags);
@@ -22,4 +23,10 @@ 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 ExecSortInitializeWorker(SortState *node, shm_toc *toc);
+extern void ExecSortRetrieveInstrumentation(SortState *node);
+
#endif /* NODESORT_H */