Re: Logical replication launcher did not automatically restart when got SIGKILL
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: cca5507 <cca5507@qq.com>
Cc: shveta malik <shveta.malik@gmail.com>,
Fujii Masao <masao.fujii@oss.nttdata.com>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-25T15:30:02Z
Lists: pgsql-hackers
Attachments
- v1-0001-Add-regression-test-for-background-worker-restart.patch (application/octet-stream) patch v1-0001
On Fri, Jul 25, 2025 at 10:53 PM cca5507 <cca5507@qq.com> wrote:
>
> > For example, we could add a check like the following to 013_crash_restart.pl.
> > Thoughts?
> >
> > -----------------
> > is($node->safe_psql('postgres',
> > "SELECT count(*) = 1 FROM pg_stat_activity WHERE backend_type =
> > 'logical replication launcher'"),
> > 't',
> > 'logical replication launcher is running after crash');
> > -----------------
Patch attached.
I confirmed that the test fails when applied to a version before
commit b5d084c5353 (i.e., before the bug was fixed), and it passes
on HEAD with the patch applied.
> Agree, but we need note that the logical replication launcher won't be registered in some case. (see ApplyLauncherRegister())
Since 013_crash_restart.pl doesn't set any parameters that would
prevent the logical replication launcher from starting, I think
we don't need to worry about that. No??
Regards,
--
Fujii Masao
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add regression test for background worker restart after crash.
- cc321b1d1c55 19 (unreleased) landed
-
Fix background worker not restarting after crash-and-restart cycle.
- 75f633f54aaa 18.0 landed
- b5d084c5353f 19 (unreleased) landed
-
Refactor code to handle death of a backend or bgworker in postmaster
- 28a520c0b773 18.0 cited