citus icon indicating copy to clipboard operation
citus copied to clipboard

Check for Citus table in worker_copy_table_to_node

Open Green-Chan opened this issue 1 year ago • 0 comments

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.

Green-Chan avatar Jul 25 '24 14:07 Green-Chan