RE: BUG #19041: Logical replication locks wal processing

Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>

From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Sergey Belyashov' <sergey.belyashov@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>
Cc: "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2025-09-05T02:28:45Z
Lists: pgsql-bugs
Dear Sergey,

> Thank you for your explanation. It is what I'm about.
> Is it possible to optimize something to prevent decoding the whole WAL
> if there are no affected tables there?

I recalled there was a proposal which skips decoding changes for unpublished
tables, but it was withdrawn [1]. One of reasons was that a new transaction must
be started to check whether the table must be published or not, thus the
performance can be degraded in some cases.

I have also considered Dilip's idea [2] once, but it needs some architectural
changes. I cannot find on-going thread neither.

[1]: https://commitfest.postgresql.org/patch/5585/
[2]: https://www.postgresql.org/message-id/CAFiTN-uwgQ%3DHVFRdz2%3DJUVgQHCPubatKrK14xD-0Ov71HRpbTQ%40mail.gmail.com

Best regards,
Hayato Kuroda
FUJITSU LIMITED