I have some separate questions on the executor changes. Basically, this
seems the right direction, but I wonder if some things could be clarified.
I wonder why in ExecWorkTableScan() and ExecReScanWorkTableScan() you
call tuplestore_copy_read_pointer() instead of just
tuplestore_select_read_pointer(). What is the special role of read
pointer 0 that you are copying. Before your changes, it was just the
implicit read pointer, but now that we have several, it would be good to
explain their relationship.
Also, the comment you deleted says "Therefore, we don't need a private
read pointer for the tuplestore, nor do we need to tell
tuplestore_gettupleslot to copy." You addressed the first part with the
read pointer handling, but what about the second part? The
tuplestore_gettupleslot() call in WorkTableScanNext() still has
copy=false. Is this an oversight, or did you determine that copying is
still not necessary?