Re: How to prioritise walsender reading from pg_wal over WAL writes? - Mailing list pgsql-performance

From Laurenz Albe
Subject Re: How to prioritise walsender reading from pg_wal over WAL writes?
Date
Msg-id 6a3a9ef99167a7baeaeee3d3df4af59694277e36.camel@cybertec.at
Whole thread Raw
In response to Re: How to prioritise walsender reading from pg_wal over WAL writes?  (Alexey Bashtanov <bashtanov@imap.cc>)
Responses Re: How to prioritise walsender reading from pg_wal over WAL writes?
List pgsql-performance
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




pgsql-performance by date:

Previous
From: Alexey Bashtanov
Date:
Subject: Re: How to prioritise walsender reading from pg_wal over WAL writes?
Next
From: Frits Jalvingh
Date:
Subject: Re: Postgres using nested loops despite setting enable_nestloop to false