Logical replication slots on slaves/replicas?

Piotr Andreassen Blasiak <piotr@attendium.com>

From: Piotr Andreassen Blasiak <piotr@attendium.com>
To: pgsql-general@lists.postgresql.org
Date: 2024-08-01T08:42:20Z
Lists: pgsql-general
Hi,

I know that currently logical replication slots are available only for primary servers. Is there any plan to add this feature to read slaves as well? My problem is this:

I want to use debezium to stream changes from postgresql. But, if I stream changes from the master I can not query my read slaves for related data to these changes - I need to always query the master which is not scalable. So either I need a way to be able to know when the change has been propagated to my read replica so that I can reliably query it, or I am hoping I can simply read all the changes from the read replica which will mean it is already up to date when I query it.

Piotr Andreassen Blasiak