On Fri, Jun 3, 2016 at 11:13 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> I think the workers should stop processing tuples after the tuple queues got
>> detached. This will not only handle above situation gracefully, but will
>> allow to speed up the queries where Limit clause is present on top of Gather
>> node. Patch for the same is attached with mail (this was part of original
>> parallel seq scan patch, but was not applied and the reason as far as I
>> remember was we thought such an optimization might not be required for
>> initial version).
>
> This is very likely a good idea, but...
>
>> Another approach to fix this issue could be to reset mqh_partial_bytes and
>> mqh_length_word_complete in shm_mq_sendv in case of SHM_MQ_DETACHED. These
>> are currently reset only incase of success.
>
> ...I think we should do this too
Patches for both of these things are now committed. Barring problems
with those commits, I believe this resolves this open item.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company