Re: Logical WAL sender unresponsive during decoding commit
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2022-08-16T05:32:44Z
Lists: pgsql-hackers
On Tue, Aug 16, 2022 at 2:31 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Tue, Aug 16, 2022 at 10:56 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > > > On Tue, Aug 16, 2022 at 2:08 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > > > On Tue, Aug 16, 2022 at 9:28 AM Andrey Borodin <x4mmm@yandex-team.ru> wrote: > > > > > > > > Hi hackers! > > > > > > > > Some time ago I've seen a hanging logical replication that was trying to send transaction commit after doing table pg_repack. > > > > I understand that those things do not mix well. Yet walsender was ignoring pg_terminate_backend() and I think this worth fixing. > > > > Can we add CHECK_FOR_INTERRUPTS(); somewhere in this backtrace? > > > > > > > > > > I think if we want to do this in this code path then it may be it is > > > better to add it in ReorderBufferProcessTXN where we are looping to > > > process each change. > > > > +1 > > > > The same issue is recently reported[1] on -bugs and I proposed the > > patch that adds CHECK_FOR_INTERRUPTS() to the loop in > > ReorderBufferProcessTXN(). I think it should be backpatched. > > > > I agree that it is better to backpatch this as well. Would you like to > verify if your patch works for all branches or if it need some tweaks? > Yes, I've confirmed v10 and master but will do that for other branches and send patches for all supported branches. Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/
Commits
-
Add CHECK_FOR_INTERRUPTS while restoring changes during decoding.
- ce20f8b9f435 16.0 landed
- 10eaa975018f 15.1 landed
- 36fc013fabd9 14.6 landed
- 1eed947f9852 13.9 landed
- f7f82cf05a3f 12.13 landed
- 5c51afe23d65 11.18 landed
- 61838d2dd3c4 10.23 landed
-
Add CHECK_FOR_INTERRUPTS while decoding changes.
- f972ec5c285c 16.0 landed
- 42681dffafa2 15.0 landed
- 6d05d575bec5 14.6 landed
- 4985a45917c8 13.9 landed
- 9415873aee9d 12.13 landed
- 51e9469a41ad 11.18 landed
- 6b50433e865e 10.23 landed