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 1lABVf-0002Or-F4 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Feb 2021 12:55:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lABVe-0000BN-12 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Feb 2021 12:55:50 +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 1lABVd-0000BF-Pv for pgsql-hackers@lists.postgresql.org; Thu, 11 Feb 2021 12:55:49 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lABVb-0003HB-PT for pgsql-hackers@postgresql.org; Thu, 11 Feb 2021 12:55:48 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1A2B45C018A; Thu, 11 Feb 2021 07:55:47 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 11 Feb 2021 07:55:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=NuxhvEehhmZTOEx+8WsJx1+PIF0 mJmrSu0s2KpDFVuA=; b=hqjY0mmVrnojA7+3xZzeociPxTnH//0BqzSEYf1YNRv lWs+oGNmlyO/1eKo9nO7yQWju7R4ZZ88fhljLY1zWalpyJq+bwttn8UpCFPn2SmS rJkf1dlwB1fY05tUbUVImLnSZ5uJGuFicOGAGoFnyGH/Wzvk4IwtYMjct0k2uP/h DIO35QS/1ndIe3nz6iMyylNLGjcn34tKB1JBDZZrGLp93A252SUuqV7X/A6C29Jr iVB4e3TGkT+zpA0+NytiXSMe5hqx5MI47mKWvHSnQOQrC7D2M8lzNn/VBA0mAArZ B1KeVGjp+q8HTREmjdQbTYkXnWZ9wViTNBODbHF1G9g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=NuxhvE ehhmZTOEx+8WsJx1+PIF0mJmrSu0s2KpDFVuA=; b=TRGxFVu4G12JMAaoJZ4cFl xSTrjUTZAe8BqldSTNXwWTl9B2/E64xWAj2rGUzqCXcKc3VjbIVyTAuihmmomtuB yvSEPlqzIBMgfpy81Ae0VwePPFodMTjq8O0Qp6Y1VWvgwcHbS0E5HuGGCQNwAt7C RkrwyV/SjScdZ0g6ALlRhSrpk8bQi+zZaD99ol9TnGl5VQjh9rloDqmOFCYWgwjP 1BKgaryLnBnC4ndYpdrXk+7snkzDrhbBzpHqM+a/eVM+qHpFE8sYgRzrEE99NBuS jGc3L/xjgCzy38oFYwea4fRiLWRZ1W1yTdHaNN5OdLjP2LwooAhPMUxmhe5ACPPg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheelgdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveejheeh ieevueeigeelteegleejleeiueeiheegvefhnecukfhppeduuddurddutddvrddukedtrd dukeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep mhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id A2EB524005C; Thu, 11 Feb 2021 07:55:45 -0500 (EST) Date: Thu, 11 Feb 2021 21:55:40 +0900 From: Michael Paquier To: Fujii Masao Cc: pgsql-hackers@postgresql.org Subject: Re: ERROR: invalid spinlock number: 0 Message-ID: References: <7ef8708c-5b6b-edd3-2cf2-7783f1c7c175@oss.nttdata.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FRPGRTEL637QWWvA" Content-Disposition: inline In-Reply-To: <7ef8708c-5b6b-edd3-2cf2-7783f1c7c175@oss.nttdata.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --FRPGRTEL637QWWvA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Fujii-san, On Tue, Feb 09, 2021 at 11:17:04PM +0900, Fujii Masao wrote: > ISTM that the commit 2c8dd05d6c caused this issue. The commit changed > pg_stat_get_wal_receiver() so that it reads "writtenUpto" by using > pg_atomic_read_u64(). But since "writtenUpto" is initialized only when > walreceiver starts up, reading "writtenUpto" before the startup of > walreceiver can cause the error. Indeed, that's a problem. We should at least move that out of the spin lock area. I'll try to look at that in details, and that's going to take me a couple of days at least. Sorry for the delay. -- Michael --FRPGRTEL637QWWvA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmAlKUwACgkQnvQgOdby QH1H5BAAlTjh9mkTWmch7ckPWlv0j5dflZ1CuLMsiNDm5hJWVFWVrt2tlmKy4nBl cMH8tqkyGrnBZtj1tId2VVjyCboKXtQEbPKVMq38/c+PdQxovbStHABeDhrHU+vA 9CPbV9hkNuC9CZ4S8xxBo0fmC+HTUj+yAnyx78vLkDzsKvyvKj8c5/iTvR2m7ofB vJ95NQalt3pQZ3CfKsgksBWyUgaPvieN8v5k8wRNN/Rht8qSXyEPYTCpExmYjThC cwzGrHZXwecXhByT7FoQL/F4XeOXYl22r/pxTMvtcSKVVUGPLWRIpFGJTl5slWdZ xO7A9XOYDMAwKQLS32P0uK53cvQ1ncXzZzEdW4qD6WNyZByb1iqWa7T7ciLcgXN3 4W4png9RD481ruY0iWvune3uSuEKOwvbL6LUDfk9Et8m3XC7CZ7hjbO4wp+6QBFP dhjoBC3KqOL8YPUOK35UJuV7WXD+rgj6IcYasKYiPsjntEcp8UrjssLevwn5oFtL fwDIzH18lEZ4jpMnb/mv3/a2G/j41L3jcNsP6xmtm5D/EMTEzGNrt3bkVrYOL2ux gvCF2yzEPt5CkmEObg8fDBcm8/ChrHER38lASgp4iXsZFd5tDsFR61fI60o5CiU7 9fPrOirX7JDf53VdSeS3zJhqHGmr0bo4kI2REZqfhLhr6oQhGt0= =5KgB -----END PGP SIGNATURE----- --FRPGRTEL637QWWvA--