Re: How to prioritise walsender reading from pg_wal over WAL writes?

From: Alexey Bashtanov <bashtanov(at)imap(dot)cc>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: How to prioritise walsender reading from pg_wal over WAL writes?
Date: 2020-11-19 13:38:46
Message-ID: 754ba288-1c2c-a4b4-0fb3-38fbc03053fd@imap.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


> 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?
It is really the walsender, and it really is the performance of the WAL
storage on the master.
> Check the difference between "sent_lsn", "replay_lsn" from "pg_stat_replication" and
> pg_current_wal_lsn() on the primary.
Yes I've checked these numbers, the lagging one is sent_lsn.
It doesn't look like it's hitting network capacity either.
When we moved it to an NVMe as a short-term solution it worked fine.

Best, Alex

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Nandakumar M 2020-11-21 20:27:57 Simple update query is slow
Previous Message Frits Jalvingh 2020-11-19 11:52:42 Re: Postgres using nested loops despite setting enable_nestloop to false