Siraj G <tosiraj.g@xxxxxxxxx> writes: > As the subject says, today very frequently our replica DB is going into the > recovery mode causing an outage in the application side. If you're not on this month's minor releases, perhaps you should be: Reduce memory consumption of logical decoding (Masahiko Sawada) Use a smaller default block size to store tuple data received during logical replication. This reduces memory wastage, which has been reported to be severe while processing long-running transactions, even leading to out-of-memory failures. I recall past updates that fixed other memory leaks in logical replication, too. > Pgsql: 12.2 Egad. Your version-updating strategy seriously needs a rethink. regards, tom lane