How to connect two PostgreSQL databases in two different locations
I would create a materialized view on the foreign tables.

You can refresh the materialized view while the remote database is available and use it in between.