Re: BUG #19041: Logical replication locks wal processing

Dilip Kumar <dilipbalaut@gmail.com>

From: Dilip Kumar <dilipbalaut@gmail.com>
To: Sergey Belyashov <sergey.belyashov@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-09-03T12:45:13Z
Lists: pgsql-bugs
On Wed, Sep 3, 2025 at 5:40 PM Sergey Belyashov
<sergey.belyashov@gmail.com> wrote:
>
> 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? For example, just skip a lot of
> WAL blocks with unpublished tables. And/or combine WAL decoding in one
> separate process for each publication which works for all active
> affected subscriptions, if subscription is not active (server down or
> too busy) then it is switched to legacy selfdecoding.

IMHO this is a valid optimization to have a single decoding worker and
all the walsender can get the required WALs decoded by a single
worker.  I think it's been discussed in the past as well and we might
do it sometime in the future but I don't see anything is in progress
for this as of now.

-- 
Regards,
Dilip Kumar
Google