citus
citus copied to clipboard
Check for Citus table in worker_copy_table_to_node
Fixes #6795
The worker_copy_table_to_node is not supposed to be called for Citus tables. When this function was initially introduced in #6098 , it had the respective check. But the check was omitted, since worker_copy_table_to_node called for Citus table finishes with error anyway:
ERROR: cannot execute a distributed query from a query on a shard
DETAIL: Executing a distributed query in a function call that may be pushed to a remote node can lead to incorrect results.
It turns out that in some cases this error does not occur. See #6795
I suggest restoring that check.