How to create a "live" feed for two seperate Postgres Instances?

98 views Asked by At

So I feel pretty confident inside of Postgres but I have an interesting problem in my opinion.

I have my local Postgres instance and a remote Postgres instance. My remote instance is read only as it is a production server. I need to be able to pull records and generate views/tables/reports/whatever.

How can I accomplish that?

Currently I am using dblink running every 15 Minutes pretty much resetting my local instance by dropping all objects and using pgAgent jobs to rebuild all objects ready for the next cycle. It is really labor intensive to make changes and even worse to troubleshoot.

1

There are 1 answers

0
lemoney On BEST ANSWER

My eventual solution was to make views through dblink. it is slightly clunky but the speed increase is substantial and worth the more restrictive coding requirements for the connection.