From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
Subject: | Re: Syncrep and improving latency due to WAL throttling |
Date: | 2023-01-27 11:04:39 |
Message-ID: | CALj2ACW339Dk-E31S_x6hX4SdEHkH8LOY9afvwQXORJjVk8xQQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 27, 2023 at 2:03 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2023-Jan-27, Bharath Rupireddy wrote:
>
> > Looking at the patch, the feature, in its current shape, focuses on
> > improving replication lag (by throttling WAL on the primary) only when
> > synchronous replication is enabled. Why is that? Why can't we design
> > it for replication in general (async, sync, and logical replication)?
> >
> > Keeping replication lag under check enables one to provide a better
> > RPO guarantee
>
> Hmm, but you can already do that by tuning walwriter, no?
IIUC, one can increase wal_writer_delay or wal_writer_flush_after to
control the amount of WAL walwriter writes and flushes so that the
walsenders will get slower a bit thus improving replication lag. If my
understanding is correct, what if other backends doing WAL writes and
flushes? How do we control that?
I think tuning walwriter alone may not help to keep replication lag
under check. Even if it does, it requires manual intervention.
--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Jakub Wartak | 2023-01-27 11:06:49 | Re: Syncrep and improving latency due to WAL throttling |
Previous Message | Hayato Kuroda (Fujitsu) | 2023-01-27 11:01:19 | RE: Assertion failure in SnapBuildInitialSnapshot() |