| From: | Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com> |
|---|---|
| To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Fix "unexpected logical decoding status change" error; from concurrent logical decoding activation |
| Date: | 2026-07-21 04:52:52 |
| Message-ID: | CAFC+b6oR4TwS8wXeZ2_hP0xFE+0t6WTFkSNQ5JpD7u454f9O8A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Jul 21, 2026 at 6:12 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
wrote:
>
> IIUC it's too late to inform the primary during
> XLOG_LOGICAL_DECODING_STATUS_CHANGE redo; the standby replays that
> record only after the primary has disabled logical decoding, so WAL
> lacking the information required for logical decoding has already been
> generated. Once such a gap exists, the standby's slots cannot decode
> past it even if the primary re-enabled logical decoding in response,
> so we would have to invalidate them anyway.
>
> Alternatively, standbys could proactively tell the primary about their
> slots (like hot_standby_feedback), but I don't think this can be made
> reliable. With cascaded standbys the information has to be propagated
> up through each level, and the propagation lag leaves an unavoidable
> race: by the time the primary learns that a downstream server still
> needs logical WAL, its slots may already be gone, or a new slot could
> be created right after the primary decided to disable.
>
makes sense.
--
Thanks :)
Srinath Reddy Sadipiralla
EDB: https://www.enterprisedb.com/
" Maybe that's what Batman is about. Not winning. But failing, and getting
back up. "
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nico Williams | 2026-07-21 04:57:00 | Re: document the dangers of granting TRIGGER or REFERENCES |
| Previous Message | Amit Kapila | 2026-07-21 04:44:24 | Re: sequencesync worker race with REFRESH SEQUENCES |