agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: michael@paquier.xyz
Cc: thomas.munro@gmail.com
Cc: tomas.vondra@2ndquadrant.com
Cc: andres@anarazel.de
Cc: a.zakirov@postgrespro.ru
Cc: ah@cybertec.at
Cc: magnus@hagander.net
Cc: robertmhaas@gmail.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: shared-memory based stats collector
Date: Mon, 9 Mar 2020 15:37:05 -0300
Message-ID: <20200309183705.GA10363@alvherre.pgsql> (raw)
In-Reply-To: <15888.1583770875@sss.pgh.pa.us>

Tom Lane escribió:

In patch 0003,

>  		/*
> -		 * Was it the archiver?  If so, just try to start a new one; no need
> -		 * to force reset of the rest of the system.  (If fail, we'll try
> -		 * again in future cycles of the main loop.).  Unless we were waiting
> -		 * for it to shut down; don't restart it in that case, and
> -		 * PostmasterStateMachine() will advance to the next shutdown step.
> +		 * Was it the archiver?  Normal exit can be ignored; we'll start a new
> +		 * one at the next iteration of the postmaster's main loop, if
> +		 * necessary. Any other exit condition is treated as a crash.
>  		 */
>  		if (pid == PgArchPID)
>  		{
>  			PgArchPID = 0;
>  			if (!EXIT_STATUS_0(exitstatus))
> -				LogChildExit(LOG, _("archiver process"),
> -							 pid, exitstatus);
> -			if (PgArchStartupAllowed())
> -				PgArchPID = pgarch_start();
> +				HandleChildCrash(pid, exitstatus,
> +								 _("archiver process"));
>  			continue;
>  		}

I'm worried that we're causing all processes to terminate when an
archiver dies in some ugly way; but in the current coding, it's pretty
harmless and we'd just start a new one.  I think this needs to be
reconsidered.  As far as I know, pgarchiver remains unconnected to
shared memory so a crash-restart cycle is not necessary.  We should
continue to just log the error message and move on.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (238+ messages)  latest in thread

Message-ID: <20200309183705.GA10363@alvherre.pgsql>
Permalink:  ../20200309183705.GA10363@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200309183705.GA10363@alvherre.pgsql

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, horikyota.ntt@gmail.com, michael@paquier.xyz, thomas.munro@gmail.com, tomas.vondra@2ndquadrant.com, andres@anarazel.de, a.zakirov@postgrespro.ru, ah@cybertec.at, magnus@hagander.net, robertmhaas@gmail.com
  Subject: Re: shared-memory based stats collector
  In-Reply-To: <20200309183705.GA10363@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox