Re: Out of Memory error triggering replica to transition into recovery mode

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Siraj G <tosiraj(dot)g(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Out of Memory error triggering replica to transition into recovery mode
Date: 2024-11-28 16:31:22
Message-ID: 2092967.1732811482@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Siraj G <tosiraj(dot)g(at)gmail(dot)com> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Debraj Manna 2024-11-29 10:05:30 Do postgres use implicit transaction in UPDATE ... RETURNING queries?
Previous Message Siraj G 2024-11-28 13:34:57 Out of Memory error triggering replica to transition into recovery mode