HV021ERRORTier 2 — Caution✅ HIGH confidencefdw_inconsistent_descriptor_information
What this means
A foreign data wrapper detected inconsistent descriptor information, typically when the column count or types returned by the remote server do not match the expected descriptor.
Why it happens
- 1Remote table schema changed (column added/removed/retyped) after the foreign table was defined locally
- 2FDW descriptor built with different column count than actual remote result
- 3FDW implementation bug — descriptor not properly initialised
How to reproduce
Querying a foreign table whose remote schema has diverged from the local foreign table definition
SELECT * FROM my_foreign_table; -- remote table had columns added/removedFix 1: Redefine the foreign table to match the remote schema
Remote table schema changed
DROP FOREIGN TABLE my_foreign_table;
IMPORT FOREIGN SCHEMA remote_schema LIMIT TO (my_table) FROM SERVER myserver INTO public;Why this works
Recreates the foreign table definition to match the current remote schema
What not to do
Do not ALTER the remote table without updating the local foreign table definition
Why it's wrong: Schema drift causes descriptor mismatches
Sources
📚 Official docs: https://www.postgresql.org/docs/current/sql-importforeignschema.html
🔧 Source ref: https://www.postgresql.org/docs/current/errcodes-appendix.html
Confidence assessment
✅ HIGH confidence
Standard FDW error code from official PostgreSQL appendix.
See also
🔗 Related errors
📄 Reference pages