From: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
---|---|
To: | 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com>, 'Masahiko Sawada' <sawada(dot)mshk(at)gmail(dot)com> |
Cc: | "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, 'Peter Smith' <smithpb2250(at)gmail(dot)com>, 'Kyotaro Horiguchi' <horikyota(dot)ntt(at)gmail(dot)com>, "'andres(at)anarazel(dot)de'" <andres(at)anarazel(dot)de>, "'vignesh21(at)gmail(dot)com'" <vignesh21(at)gmail(dot)com>, "'shveta(dot)malik(at)gmail(dot)com'" <shveta(dot)malik(at)gmail(dot)com>, "Takamichi Osumi (Fujitsu)" <osumi(dot)takamichi(at)fujitsu(dot)com>, "'dilipbalaut(at)gmail(dot)com'" <dilipbalaut(at)gmail(dot)com>, "'euler(at)eulerto(dot)com'" <euler(at)eulerto(dot)com>, "'m(dot)melihmutlu(at)gmail(dot)com'" <m(dot)melihmutlu(at)gmail(dot)com>, "'marcos(at)f10(dot)com(dot)br'" <marcos(at)f10(dot)com(dot)br>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | RE: Time delayed LR (WAS Re: logical replication restrictions) |
Date: | 2023-03-02 13:28:09 |
Message-ID: | TYAPR01MB586649A15448343DBC0EC8DFF5B29@TYAPR01MB5866.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Yeah, min_send_delay and max_slots_wal_keep_size should be easily tunable
> because
> the appropriate value depends on the enviroment and workload.
> However, pg_replication_slots.pg_replication_slots cannot show the exact amout
> of WALs,
> so it may not suitable for tuning. I think user can compare the value
> pg_replication_slots.restart_lsn (or pg_stat_replication.sent_lsn) and
> pg_current_wal_lsn() to calclate number of WALs to be delayed, like
>
> ```
> postgres=# select pg_current_wal_lsn() - pg_replication_slots.restart_lsn as
> delayed from pg_replication_slots;
> delayed
> ------------
> 1689153760
> (1 row)
> ```
>
> > I think it would be better to tell about this in the docs along with
> > the 'min_send_delay' description. The key point is whether this would
> > be an acceptable trade-off for users who want to use this feature. I
> > think it can harm only if users use this without understanding the
> > corresponding trade-off. As we kept the default to no delay, it is
> > expected from users using this have an understanding of the trade-off.
>
> Yes, the trade-off should be emphasized.
Based on the understanding, I added them to the doc in new version patch.
Please see [1].
Best Regards,
Hayato Kuroda
FUJITSU LIMITED
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2023-03-02 13:52:53 | Re: generic plans and "initial" pruning |
Previous Message | Hayato Kuroda (Fujitsu) | 2023-03-02 13:27:49 | RE: Time delayed LR (WAS Re: logical replication restrictions) |