Re: BUG #17580: use pg_terminate_backend to terminate a wal sender process may wait a long time
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: 巨鲸 <13207961@qq.com>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Date: 2022-08-15T04:02:59Z
Lists: pgsql-bugs
Attachments
- v1-0001-Add-CHECK_FOR_INTERRUPTS-in-logical-decoding-s-pr.patch (application/x-patch) patch v1-0001
Hi, On Mon, Aug 15, 2022 at 11:27 AM 巨鲸 <13207961@qq.com> wrote: > > Hi Masahiko, > I think maybe you should use filter-tables to filter the test table, likes: > filter-tables="public.test666" > Thanks, I could reproduce this issue with the option. And I've confirmed this issue exists also in the latest minor version, 10.22, and HEAD. If the plugin filters out all changes, there is no place to check the interruptions. So I think it makes sense to add CHECK_FOR_INTERRUPTS to the main loop of processing logical change. It would be better to do that on the core, rather than the plugin side. I've attached the patch. I think we should backpatch to 10. Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/
Commits
-
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