Normally citus does not create its truncate trigger when creating a reference table or a distributed table from a "foreign table". However in mx arch., somehow we attempt to create the truncate trigger on the worker node and PostgreSQL fails as below:
SET citus.replication_model TO streaming;
SELECT start_metadata_sync_to_node ('localhost', 9701);
CREATE EXTENSION file_fdw;
CREATE SERVER pglog FOREIGN DATA WRAPPER file_fdw;
CREATE FOREIGN TABLE pglog_table (a int, b int) server pglog options (filename '/path/to.csv', format 'csv');
SELECT create_reference_table('pglog_table');
ERROR: "pglog_table" is a foreign table
DETAIL: Foreign tables cannot have TRUNCATE triggers.
CONTEXT: while executing command on localhost:9701
Normally citus does not create its truncate trigger when creating a reference table or a distributed table from a "foreign table". However in mx arch., somehow we attempt to create the truncate trigger on the worker node and PostgreSQL fails as below: