Fix slot type assumptions for nodeGather[Merge].
authorAndres Freund <andres@anarazel.de>
Fri, 16 Nov 2018 07:10:50 +0000 (23:10 -0800)
committerAndres Freund <andres@anarazel.de>
Fri, 16 Nov 2018 07:16:41 +0000 (23:16 -0800)
commita387a3dff9001225ad571ff2755d139f5bd193b3
tree3dac372cd2fa302d2c6cd4ecb4d21d73ca07fd85
parentf92cd7392386147f6a16787c1d5c78d0e9b7cf34
Fix slot type assumptions for nodeGather[Merge].

The assumption made in 1a0586de3657c was wrong, as evidenced by
buildfarm failure on locust, which runs with
force_parallel_mode=regress.  The tuples accessed in either nodes are
in the outer slot, and we can't trivially rely on the slot type being
known because the leader might execute the subsidiary node directly,
or via the tuple queue on a worker. In the latter case the tuple will
always be a heaptuple slot, but in the former, it'll be whatever the
subsidiary node returns.
src/backend/executor/nodeGather.c
src/backend/executor/nodeGatherMerge.c