| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Andrey Silitskiy <a(dot)silitskiy(at)postgrespro(dot)ru> |
| Cc: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "Takamichi Osumi (Fujitsu)" <osumi(dot)takamichi(at)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "sawada(dot)mshk(at)gmail(dot)com" <sawada(dot)mshk(at)gmail(dot)com>, "michael(at)paquier(dot)xyz" <michael(at)paquier(dot)xyz>, "peter(dot)eisentraut(at)enterprisedb(dot)com" <peter(dot)eisentraut(at)enterprisedb(dot)com>, "dilipbalaut(at)gmail(dot)com" <dilipbalaut(at)gmail(dot)com>, "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, "amit(dot)kapila16(at)gmail(dot)com" <amit(dot)kapila16(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Greg Sabino Mullane <htamfids(at)gmail(dot)com>, Vitaly Davydov <v(dot)davydov(at)postgrespro(dot)ru> |
| Subject: | Re: Exit walsender before confirming remote flush in logical replication |
| Date: | 2025-11-23 14:46:24 |
| Message-ID: | CAHGQGwFHJ-80uwd8jgSsm9ZL_HBvi5SXa6O6nktXiOicxHKKxQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Nov 20, 2025 at 4:05 PM Andrey Silitskiy
<a(dot)silitskiy(at)postgrespro(dot)ru> wrote:
>
> On Wed, Nov 19, 2025 at 8:46 PM Fujii Masao
> <masao(dot)fujii(at)gmail(dot)com> wrote:
> > How about using PGC_USERSET instead of PGC_SIGHUP, similar to
> > wal_sender_timeout?
>
> Dear Fujii, thanks for the review!
>
> Current version of the patch suggests changing the shutdown mode of
> logical senders globally for the server. As I wrote above: patch
> excludes receiver's side decision whether the sender is allowed to hang
> on shutdown. In addition, it provides simpler administration of a system.
Even with PGC_USERSET instead of PGC_SIGHUP, we can still control
the shutdown mode globally by setting it in postgresql.conf. The difference
is that PGC_USERSET also allows per–replication-user overrides when needed,
which gives users more flexibility without losing the ability to
set a server-wide setting, I think.
> As discussed earlier, physical replication is more sensitive to data
> divergence and there is no problem with apply_worker and backend lock
> conflict, which makes the use-case more narrow.
I think there are valid use cases for applying this setting to
physical replication as well. For example, please consider a system
that has generated a large amount of WAL due to bulk loading,
and a remote standby with a slow or low-bandwidth network link.
In such a case, some would think an immediate shutdown could be desirable
rather than waiting a long time for all outstanding WAL to be sent.
Of course, misconfiguring this parameter for physical replication could
lead to serious issues. So if we decide to apply it to physical walsenders,
the docs might need to clearly explain the risks so that users can make
informed decisions, like we've already done for other parameters like fsync,
full_page_writes, etc.
Regards,
--
Fujii Masao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Vondra | 2025-11-23 14:53:17 | Re: should we have a fast-path planning for OLTP starjoins? |
| Previous Message | Joel Jacobson | 2025-11-23 14:45:35 | [PATCH] Avoid pallocs in async.c's SignalBackends critical section |