postgresql/src
Robert Haas c6dbf1fe79 Stop the executor if no more tuples can be sent from worker to leader.
If a Gather node has read as many tuples as it needs (for example, due
to Limit) it may detach the queue connecting it to the worker before
reading all of the worker's tuples.  Rather than let the worker
continue to generate and send all of the results, have it stop after
sending the next tuple.

More could be done here to stop the worker even quicker, but this is
about as well as we can hope to do for 9.6.

This is in response to a problem report from Andreas Seltenreich.
Commit 44339b892a should be actually be
sufficient to fix that example even without this change, but it seems
better to do this, too, since we might otherwise waste quite a large
amount of effort in one or more workers.

Discussion: CAA4eK1KOKGqmz9bGu+Z42qhRwMbm4R5rfnqsLCNqFs9j14jzEA@mail.gmail.com

Amit Kapila
2016-06-06 14:52:58 -04:00
..
backend Stop the executor if no more tuples can be sent from worker to leader. 2016-06-06 14:52:58 -04:00
bin pg_upgrade: Don't overwrite existing files. 2016-06-06 09:51:56 -04:00
common Remove redundant message in AddUserToTokenDacl(). 2016-04-06 23:40:51 -04:00
fe_utils Fix comment. 2016-05-15 17:04:01 -04:00
include Stop the executor if no more tuples can be sent from worker to leader. 2016-06-06 14:52:58 -04:00
interfaces Translation updates 2016-05-09 10:04:41 -04:00
makefiles Fix typos in comments and doc 2016-01-28 16:47:36 +09:00
pl Translation updates 2016-05-09 10:04:41 -04:00
port Fix typo in VS2015 patch 2016-04-29 09:49:31 -04:00
template Remove some remains from Alpha support removal 2015-10-29 16:40:14 -04:00
test Mark read/write expanded values as read-only in ValuesNext(), too. 2016-06-03 18:07:14 -04:00
timezone Update time zone data files to tzdata release 2016d. 2016-05-05 20:08:58 -04:00
tools Fix various common mispellings. 2016-06-03 16:08:45 +01:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
Makefile.global.in Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
Makefile.shlib AIX: Link TRANSFORM modules with their dependencies. 2015-07-15 21:00:26 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00