You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Modify tqueue infrastructure to support transient record types.
Commit4a4e689, which introduced thismechanism, failed to account for the fact that the RECORD pseudo-typeuses transient typmods that are only meaningful within a singlebackend. Transferring such tuples without modification between twocooperating backends does not work. This commit installs a systemfor passing the tuple descriptors over the same shm_mq being used tosend the tuples themselves. The two sides might not assign the sametransient typmod to any given tuple descriptor, so we must alsosubstitute the appropriate receiver-side typmod for the one used bythe sender. That adds some CPU overhead, but still seems better thanbeing unable to pass records between cooperating parallel processes.Along the way, move the logic for handling multiple tuple queues fromtqueue.c to nodeGather.c; tqueue.c now provides a TupleQueueReader,which reads from a single queue, rather than a TupleQueueFunnel, whichpotentially reads from multiple queues. This change was suggestedpreviously as a way to make sure that nodeGather.c rather than tqueue.chad policy control over the order in which to read from queues, butit wasn't clear to me until now how good an idea it was. typmodmapping needs to be performed separately for each queue, and it ismuch simpler if the tqueue.c code handles that and leaves multiplexingmultiple queues to higher layers of the stack.