Postgres supports the Foreign Data Wrapper concept from SQL/MED. If you configure this you can do joins across instances, even!
https://www.postgresql.org/docs/current/postgres-fdw.html