From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Alexey Bashtanov <bashtanov@imap.cc>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to prioritise walsender reading from pg_wal over WAL writes?
Date: Wed, 18 Nov 2020 17:20:58 +0100
Message-ID: <6a3a9ef99167a7baeaeee3d3df4af59694277e36.camel@cybertec.at> (raw)
In-Reply-To: <de2437b8-6de7-b9ce-0835-2d57e989ee30@imap.cc>
References: <774ec1b8-c7c6-cfa2-098d-5c6a32dcfc1a@imap.cc>
<e40e61e6671d02ce79512439054bda9932bef8c1.camel@cybertec.at>
<de2437b8-6de7-b9ce-0835-2d57e989ee30@imap.cc>
On Wed, 2020-11-18 at 12:15 +0000, Alexey Bashtanov wrote:
> My reply did not get threaded appropriately.
> My original question was here:
> https://www.postgresql.org/message-id/a74d5732-60fd-d18b-05fd-7b2b97099f19%40imap.cc
> I'd like to prioritize walsender for replication not to lag too much.
> Otherwise, when I have load spikes on master, standby lags, sometimes by
> hundreds of gigabytes.
I would first determine where the bottleneck is.
Is it really the walsender, or is it on the network or in the standby server's replay?
Check the difference between "sent_lsn", "replay_lsn" from "pg_stat_replication" and
pg_current_wal_lsn() on the primary.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
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: pgsql-performance@postgresql.org
Cc: laurenz.albe@cybertec.at, bashtanov@imap.cc
Subject: Re: How to prioritise walsender reading from pg_wal over WAL writes?
In-Reply-To: <6a3a9ef99167a7baeaeee3d3df4af59694277e36.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox