Restart logical replication launcher when killed
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 21 Jun 2017 19:15:29 +0000 (15:15 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 21 Jun 2017 19:15:29 +0000 (15:15 -0400)
Author: Yugo Nagata <nagata@sraoss.co.jp>

src/backend/tcop/postgres.c

index fd6c9cf039d0a0d74d60f4ed7e3ff7a9fdedf710..fdc8c71a858a30f75cd7a8224b946e2f2cc3be50 100644 (file)
@@ -2854,8 +2854,9 @@ ProcessInterrupts(void)
            ereport(DEBUG1,
                    (errmsg("logical replication launcher shutting down")));
 
-           /* 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);
        }
        else if (RecoveryConflictPending && RecoveryConflictRetryable)
        {