public inbox for [email protected]  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <[email protected]>
To: Jon Zeppieri <[email protected]>
Cc: Nick Cleaton <[email protected]>
Cc: [email protected]
Subject: Re: Possible causes of high_replay lag, given replication settings?
Date: Fri, 25 Jul 2025 19:12:26 -0400
Message-ID: <CAKAnmm+jtytmNAYDjBkiQvCHQVwtskUzvp3J_=5mUsFvaOkRVA@mail.gmail.com> (raw)
In-Reply-To: <CAKfDxxxqWnf2Wb8dg2Ytx497aPpb-eFugxYVJfC=Pi8DaciXyg@mail.gmail.com>
References: <CAKfDxxwF03mouH7GqdZ0AqpGKz2wTj4T3F6ei_ubEQnNtErfGA@mail.gmail.com>
	<CAFgz3ksSB1OvN1ONDOO2qvhhF-FS7PXQTQtkDQYP_Y_pcvf+6g@mail.gmail.com>
	<CAKfDxxxqWnf2Wb8dg2Ytx497aPpb-eFugxYVJfC=Pi8DaciXyg@mail.gmail.com>

On Fri, Jul 25, 2025 at 9:57 AM Jon Zeppieri <[email protected]> wrote:

> Thanks for the response, Nick. I'm curious why the situation you describe
> wouldn't also lead to the write_lag and flush_lag also being
> high. If the problem is simply keeping up with the primary, wouldn't you
> expect all three lag times to be elevated?
>

No - write and flush are pretty quick and simple, it's just putting the WAL
onto the local disk. Replay involves a lot more work as we have to parse
the WAL and apply the changes, which means doing a lot of I/O across many
files. Still, *hours* to me indicates more than just a lot of extra
traffic. Check that recovery_min_apply_delay is still 0, then log onto the
replica and see what's going on with regards to open transactions and locks.

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support


view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Possible causes of high_replay lag, given replication settings?
  In-Reply-To: <CAKAnmm+jtytmNAYDjBkiQvCHQVwtskUzvp3J_=5mUsFvaOkRVA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox