Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logical decoding on a standby node

PostgreSQL 9.4 introduced Logical Decoding: http://www.postgresql.org/docs/9.4/static/logicaldecoding.html

It also has Cascade Streaming Replication: http://www.postgresql.org/docs/9.4/static/warm-standby.html#CASCADING-REPLICATION

Logical Decoding seems to be based on Streaming Replication. However a PostgreSQL server will refuse to start a Logical replication slot on a hot standby. It will only allow Logical Decoding on the master node.

What prevents a hot standby node to replicate itself in cascade using Logical Decoding?

like image 937
Flyer Avatar asked May 20 '15 13:05

Flyer


2 Answers

A patch was submitted for PostgreSQL 10, but didn't get in.

Work continues for PostgreSQL 11.

Clients like pglogical will need modification to support streaming from a standby once the basic functionality is in postgres.

like image 68
Craig Ringer Avatar answered Oct 12 '22 19:10

Craig Ringer


A bit late...

It's essentially just unsupported because nobody had the time to implement it. There's a bunch of complications around reserving the required resources on the primary, and about continuing to correctly work when the standby, or one in a cascade above, is promoted. Nothing impossible, just work.

That kind of question you're probably more likely to get an answer about on the postgresql lists themselves.

like image 44
Andres Freund Avatar answered Oct 12 '22 20:10

Andres Freund