0

I'm working on a large project that includes some postgres database work, but I'm not very familiar w/ the details of postgres. Basically, I need to set-up a read-only DB that is a copy of our production database. In general, this is pretty easy, and I got it working on my lab.

Now here's the issue....

Our current database server has 6 databases on it. In order to save money, instead of building another DB server, I'd like to use an existing DB server (that currently housed R&D databases) to house the read-only replica.

In my research, it seems like this isn't possible using the native postgresql tools.

Am I missing anything? Is there a way to do this?

1
  • Why do you think it would be a problem to create a standby server on an existing machine? Commented Jan 1 at 19:01

1 Answer 1

2

If you plan to use physical replication, you can set up another PostgreSQL instance on your R&D server, using a different TCP port and data directory, to host the replica.

If you plan to use logical replication, you can replicate to your existing R&D instance, so long as there is no conflict between the tables on both sides.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.