From: | Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Logical replication launcher never been restarted when terminated |
Date: | 2017-06-21 17:03:53 |
Message-ID: | 20170622020353.c212c042.nagata@sraoss.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
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.
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]
https://www.postgresql.org/message-id/20170621205657.61d90605.nagata%40sraoss.co.jp
--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Attachment | Content-Type | Size |
---|---|---|
logical_launcher_terminated.patch | text/x-diff | 463 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Khandekar | 2017-06-21 17:37:48 | Re: UPDATE of partition key |
Previous Message | Marco Atzeri | 2017-06-21 16:43:31 | Re: initdb initalization failure for collation "ja_JP" |