git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: c039ba0) | patch
Improve division of labor between execParallel.c and nodeGather[Merge].c.
Fri, 1 Sep 2017 21:38:54 +0000 (17:38 -0400)
Fri, 1 Sep 2017 21:39:01 +0000 (17:39 -0400)
commit 51daa7bdb39e1bdc31eb99fd3f54f61743ebb7ae
Improve division of labor between execParallel.c and nodeGather[Merge].c.

Move the responsibility for creating/destroying TupleQueueReaders into
execParallel.c, to avoid duplicative coding in nodeGather.c and
nodeGatherMerge.c. Also, instead of having DestroyTupleQueueReader do
shm_mq_detach, do it in the caller (which is now only ExecParallelFinish).
This means execParallel.c does both the attaching and detaching of the
tuple-queue-reader shm_mqs, which seems less weird than the previous
arrangement.

These changes also eliminate a vestigial memory leak (of the pei->tqueue
array). It's now demonstrable that rescans of Gather or GatherMerge don't
leak memory.

Discussion: https://postgr.es/m/8670.1504192177@sss.pgh.pa.us
src/backend/executor/execParallel.c diff | blob | blame | history
src/backend/executor/nodeGather.c diff | blob | blame | history
src/backend/executor/nodeGatherMerge.c diff | blob | blame | history
src/backend/executor/tqueue.c diff | blob | blame | history
src/include/executor/execParallel.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /