pgsql: Restart logical replication launcher when killed

Started by Peter Eisentrautover 8 years ago3 messages
#1Peter Eisentraut
peter_e@gmx.net

Restart logical replication launcher when killed

Author: Yugo Nagata <nagata@sraoss.co.jp>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f669c09989bda894d6ba01634ccb229f0687c08a

Modified Files
--------------
src/backend/tcop/postgres.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#2Michael Paquier
michael.paquier@gmail.com
In reply to: Peter Eisentraut (#1)
Re: [COMMITTERS] pgsql: Restart logical replication launcher when killed

On Thu, Jun 22, 2017 at 4:16 AM, Peter Eisentraut <peter_e@gmx.net> wrote:

Restart logical replication launcher when killed

-           /* The logical replication launcher can be stopped at any time. */
-           proc_exit(0);
+           /* The logical replication launcher can be stopped at any time.
+            * Use exit status 1 so the background worker is restarted. */
+           proc_exit(1);
I know I am noisy on the matter but... This comment format is not PG-like.
-- 
Michael

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Andres Freund
andres@anarazel.de
In reply to: Michael Paquier (#2)
Re: [COMMITTERS] pgsql: Restart logical replication launcher when killed

On 2017-06-22 08:46:35 +0900, Michael Paquier wrote:

On Thu, Jun 22, 2017 at 4:16 AM, Peter Eisentraut <peter_e@gmx.net> wrote:

Restart logical replication launcher when killed

-           /* The logical replication launcher can be stopped at any time. */
-           proc_exit(0);
+           /* The logical replication launcher can be stopped at any time.
+            * Use exit status 1 so the background worker is restarted. */
+           proc_exit(1);
I know I am noisy on the matter but... This comment format is not PG-like.

That's since been repaired by the new pgindent run. But what I'm a bit
confused about is why we're going for proc_exit() for replication
launchers when other types of processes simply FATAL out? Seems like a
weird change. It's not like it's not log-worthy if somebody kills the
launcher?

- Andres

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers