Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfzkH-0003OF-Hl for pgsql-general@arkaria.postgresql.org; Fri, 20 Nov 2020 06:18:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kfzkF-0004kI-Bp for pgsql-general@arkaria.postgresql.org; Fri, 20 Nov 2020 06:18:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfzkF-0004kB-43 for pgsql-general@lists.postgresql.org; Fri, 20 Nov 2020 06:18:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfzk8-0003j0-K4 for pgsql-general@lists.postgresql.org; Fri, 20 Nov 2020 06:18:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0AK6HwVe1276663; Fri, 20 Nov 2020 01:17:58 -0500 From: Tom Lane To: Yi Sun cc: pgsql-general@lists.postgresql.org Subject: Re: received immediate shutdown request caused cluster failover In-reply-to: References: Comments: In-reply-to Yi Sun message dated "Fri, 20 Nov 2020 09:20:00 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1276661.1605853078.1@sss.pgh.pa.us> Date: Fri, 20 Nov 2020 01:17:58 -0500 Message-ID: <1276662.1605853078@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Yi Sun writes: > Besides command run(like pg_ctl) can cause "received immediate shutdown > request" any other reason can cause this please? That message indicates that something sent the postmaster process a SIGQUIT signal (which is all that "pg_ctl stop -m immediate" does). There's no speculation to that: a look at postmaster.c will convince you that there is no other way to reach that message. So you need to be looking for things that would be sending SIGQUIT unexpectedly. I don't know much about Patroni, but maybe something in that environment thinks that SIGQUIT'ing random processes is a good thing to do. regards, tom lane