citus
citus copied to clipboard
citus_finish_pg_upgrade() on PG 14 if there is a foreign table
psql:/tmp/citus-catalog-v9-save20220719-6328-nhwg4h:6: ERROR: "foreign_table" is a foreign table
DETAIL: Foreign tables cannot have TRUNCATE triggers.
CONTEXT: SQL statement "create trigger truncate_trigger_45903 after truncate on foreign_tables_schema_mx.foreign_table execute procedure pg_catalog.citus_truncate_trigger()"
PL/pgSQL function citus_finish_pg_upgrade() line 91 at EXECUTE
Probably need to skip foreign tables here: https://github.com/citusdata/citus/blob/5b3537cdff35363461d30b745efaf60790cbe7a7/src/backend/distributed/sql/udfs/citus_finish_pg_upgrade/latest.sql#L106-L116
I think we can do: SELECT logicalrelid FROM pg_catalog.pg_dist_partition JOIN pg_class ON (logicalrelid = oid) WHERE relkind <> 'f'
Closed by: #6100 #6103 #6106 #6171 #6176