Is it possible to have more than one replica on a PostgreSQL server? version: PostgreSQL 11.4
OS: Windows 10


This is an illustration of my question:



On 3 different machines there are one primary server per machine.

Is it possible to have one common server where replicas of these primary servers are?

When configuring a replica, I am instructed to delete the current database (the PGDATA directory), if there is one. Thus my question. If I already have a replica on that database, it is then deleted?

Do I have to have several installations of PG? Having them on their own VM's?
You understood correctly. Since streaming replication keeps the replica a physical copy of the primary database cluster, you can only replicate between one primary and one replica.

There are two options:


Keep three clusters on the replica machine, one for each primary cluster.
Use logical replication.

With logical replication, you have to make sure that each subscription replicates to different tables, ideally in different databases.