Reference table creation from a "foreign table" fails in MX
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
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:
```sql
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
```
Contributor guide
Assessment
This issue has not been assessed yet.