Hello, is it possible to connect a table from another postgres database that is on another machine to one postgres database?
1 answer
I can immediately give two possibilities:
An old and well-known dblink module that adds procedures for connecting to another server (or even the same one) and executing SQL queries.
the FOREIGN DATA WRAPPER mechanism is currently being developed. Wiki This is an opportunity to declare a table as local, but really it is in a different place. In this case, with this table, you can perform join and other frauds as if it is local. In 9.1 there was an opportunity only to read, in 9.3 - reading and writing. Now they are actively sawing towards the optimality of fulfilling requests - for example, asking the remote machine to build a grouping itself, and not deduct everything to yourself and aggregate locally.