List your external data servers and note this:
select oid, * from pg_foreign_server
Find your external table:
select oid, * from pg_class where relkind = 'f'
Then change the system directory pg_foreign_tableas:
update pg_foreign_table set ftserver = 11573931 where ftserver = 11573932
source
share