Skip to content

CREATE FOREIGN TABLE fails if the option "table_name" is not provided.  #6642

Description

Env: tools/citus_dev/citus_dev make testCluster

psql -p 9700

CREATE EXTENSION postgres_fdw;

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions