Logical replication launcher never been restarted when terminated
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t36977psql -h localhost -U postgresBuilt from patchset v1 (message #1), July 28, 2026 at 06:08 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t36977_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t36977_1 && git checkout t36977_1Patchset v1 (message #1) is on t36977_1
Hi,
As I report in another thread[1]/messages/by-id/20170621205657.61d90605.nagata@sraoss.co.jp, when the logical replication launcher
is terminated by SIGTERM, it never been restarted and we need to restart
the server to enable logical replication again.
This is because the logical replication launcher exits with exitstatus 0,
so if it exits with status 1 it is restarted by the postmaster normally.
Attached is a simple patch to fix it in this way.
However, I'm not sure this is the best way. For example, in this way,
we get the following log when the process is terminated, which we don't
get when it exits with status 0.
LOG: worker process: logical replication launcher (PID 11526) exited with exit code 1
If we don't want to get this message, we need more fixes in CleanupBackgroundWorker()
or around it.
[1]: /messages/by-id/20170621205657.61d90605.nagata@sraoss.co.jp
/messages/by-id/20170621205657.61d90605.nagata@sraoss.co.jp
--
Yugo Nagata <nagata@sraoss.co.jp>
On 6/21/17 13:03, Yugo Nagata wrote:
As I report in another thread[1], when the logical replication launcher
is terminated by SIGTERM, it never been restarted and we need to restart
the server to enable logical replication again.This is because the logical replication launcher exits with exitstatus 0,
so if it exits with status 1 it is restarted by the postmaster normally.
Attached is a simple patch to fix it in this way.
Fixed, thanks!
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Wed, 21 Jun 2017 15:17:20 -0400
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
On 6/21/17 13:03, Yugo Nagata wrote:
As I report in another thread[1], when the logical replication launcher
is terminated by SIGTERM, it never been restarted and we need to restart
the server to enable logical replication again.This is because the logical replication launcher exits with exitstatus 0,
so if it exits with status 1 it is restarted by the postmaster normally.
Attached is a simple patch to fix it in this way.Fixed, thanks!
Thanks!
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Yugo Nagata <nagata@sraoss.co.jp>
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers