Re: Inconsistent usage of BACKEND_* symbols

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Inconsistent usage of BACKEND_* symbols
Date: 2019-10-02 07:17:15
Message-ID: 20191002071715.GE3130@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 30, 2019 at 04:39:59PM +0900, Kyotaro Horiguchi wrote:
> @@ -2740,8 +2740,8 @@ pmdie(SIGNAL_ARGS)
> {
> /* autovac workers are told to shut down immediately */
> /* and bgworkers too; does this need tweaking? */
> - SignalSomeChildren(SIGTERM,
> - BACKEND_TYPE_AUTOVAC | BACKEND_TYPE_BGWORKER);
> + SignalSomeChildren(SIGTERM, BACKEND_TYPE_WORKER);
> +

For this one the comment would be inconsistent with the flags listed.

> /* and the autovac launcher too */
> if (AutoVacPID != 0)
> signal_child(AutoVacPID, SIGTERM);
> @@ -2821,8 +2821,7 @@ pmdie(SIGNAL_ARGS)
> (errmsg("aborting any active transactions")));
> /* shut down all backends and workers */
> SignalSomeChildren(SIGTERM,
> - BACKEND_TYPE_NORMAL | BACKEND_TYPE_AUTOVAC |
> - BACKEND_TYPE_BGWORKER);
> + BACKEND_TYPE_NORMAL | BACKEND_TYPE_WORKER);

Okay for this one.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2019-10-02 07:30:38 Re: Standby accepts recovery_target_timeline setting?
Previous Message Antonin Houska 2019-10-02 07:16:10 Re: Attempt to consolidate reading of XLOG page