pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Improve division of labor between execParallel.c and nodeGather[ 2+ messages / 1 participants [nested] [flat]
* pgsql: Improve division of labor between execParallel.c and nodeGather[ @ 2017-09-01 21:39 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2017-09-01 21:39 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/51daa7bdb39e1bdc31eb99fd3f54f61743ebb7ae Modified Files -------------- src/backend/executor/execParallel.c | 72 ++++++++++++++++++++++++++++++++-- src/backend/executor/nodeGather.c | 64 +++++++++++------------------- src/backend/executor/nodeGatherMerge.c | 50 +++++++---------------- src/backend/executor/tqueue.c | 4 +- src/include/executor/execParallel.h | 18 +++++---- 5 files changed, 119 insertions(+), 89 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Improve division of labor between execParallel.c and nodeGather[ @ 2017-09-01 21:39 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2017-09-01 21:39 UTC (permalink / raw) To: pgsql-committers 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/01edb5c7fc3bcf6aea15f2b3be36189b52ad9d1a Modified Files -------------- src/backend/executor/execParallel.c | 72 ++++++++++++++++++++++++++++++++-- src/backend/executor/nodeGather.c | 64 +++++++++++------------------- src/backend/executor/nodeGatherMerge.c | 50 +++++++---------------- src/backend/executor/tqueue.c | 4 +- src/include/executor/execParallel.h | 18 +++++---- 5 files changed, 119 insertions(+), 89 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-09-01 21:39 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-09-01 21:39 pgsql: Improve division of labor between execParallel.c and nodeGather[ Tom Lane <tgl@sss.pgh.pa.us> 2017-09-01 21:39 pgsql: Improve division of labor between execParallel.c and nodeGather[ Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox