You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE SERVER foreign_server
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'localhost', port '9700', dbname 'regression');
CREATE USER MAPPING FOR CURRENT_USER
SERVER foreign_server
OPTIONS (user 'emel');
CREATE FOREIGN TABLE foreign_table (
id integer NOT NULL,
data text,
a bigserial
)
SERVER foreign_server
OPTIONS (schema_name 'foreign_tables_schema_mx');
ERROR: table_name option must be provided when using postgres_fdw with Citus
HINT: Provide the option "table_name" with value target table's name
Looking at the citus regression tests (foreign_tables_mx.sql) , this seems to be expected when
SET citus.use_citus_managed_tables TO ON;
However, the above commands fail even if there is no citus configuration and citus is only loaded.
Citus utility hook seems to interfere somehow.
This bug can be confirmed by running regression tests of the extension
postgresql-14.6/contrib/postgres_fdw
postgresql-15.1/contrib/postgres_fdw
by simply loading Citus during their regression runs.
The text was updated successfully, but these errors were encountered:
It appears that the table_name option is a required field for foreign tables, by design. See #5461.
This is because Postgres uses the name of the shard when querying the fdw, not the name of the table. Since we only support foreign tables on citus local tables, we could move this check to the citus_add_local_table_to_metadata function. Let me know your thoughts on this approach.
Env: tools/citus_dev/citus_dev make testCluster
psql -p 9700
ERROR: table_name option must be provided when using postgres_fdw with Citus
HINT: Provide the option "table_name" with value target table's name
Looking at the citus regression tests (foreign_tables_mx.sql) , this seems to be expected when
SET citus.use_citus_managed_tables TO ON;
However, the above commands fail even if there is no citus configuration and citus is only loaded.
Citus utility hook seems to interfere somehow.
This bug can be confirmed by running regression tests of the extension
postgresql-14.6/contrib/postgres_fdw
postgresql-15.1/contrib/postgres_fdw
by simply loading Citus during their regression runs.
The text was updated successfully, but these errors were encountered: