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 1jRfx6-0007sn-Mq for pgsql-general@arkaria.postgresql.org; Thu, 23 Apr 2020 17:47:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jRfx5-0001Ps-JE for pgsql-general@arkaria.postgresql.org; Thu, 23 Apr 2020 17:47:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRfx5-0001Pk-B3 for pgsql-general@lists.postgresql.org; Thu, 23 Apr 2020 17:47:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRfx0-0005x4-SF for pgsql-general@lists.postgresql.org; Thu, 23 Apr 2020 17:47:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 03NHlmNr018351; Thu, 23 Apr 2020 13:47:48 -0400 From: Tom Lane To: Justin King cc: pgsql-general@lists.postgresql.org Subject: Re: walreceiver termination In-reply-to: References: Comments: In-reply-to Justin King message dated "Thu, 23 Apr 2020 12:07:12 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18349.1587664068.1@sss.pgh.pa.us> Date: Thu, 23 Apr 2020 13:47:48 -0400 Message-ID: <18350.1587664068@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Justin King writes: > We've seen unexpected termination of the WAL receiver process. This > stops streaming replication, but the replica stays available -- > restarting the server resumes streaming replication where it left off. > We've seen this across nearly every recent version of PG, (9.4, 9.5, > 11.x, 12.x) -- anything omitted is one we haven't used. > I don't have an explanation for the cause, but I was able to set > logging to "debug5" and run an strace of the walrecevier PID when it > eventually happened. It appears as if the SIGTERM is coming from the > "postgres: startup" process. The startup process intentionally SIGTERMs the walreceiver under various circumstances, so I'm not sure that there's any surprise here. Have you checked the postmaster log? regards, tom lane