1

The title is pretty much self-explanatory. To illustrate more, here's a picture:

[Live Database]-->(physical replication)-->[Physical Replica]-->(logical replication)-->[Logical Replica]

So the question is whether this setup is achievable? All the databases involved are PostgreSQL 12 instances

Denis Arharov
  • 91
  • 1
  • 10

1 Answers1

2

No, you cannot do that, because that would mean creating a logical replication slot on the physical standby. Attempting to create such a replication slot would lead to this error:

ERROR:  logical decoding cannot be used while in recovery
Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • Can you create the publication on the primary and so that it would get replicated to the secondary? And then have the subscriber connect to the replica? –  Jun 07 '21 at 13:59
  • @a_horse_with_no_name A justified question. I have verified that it does not work and improved the answer. – Laurenz Albe Jun 07 '21 at 14:26