Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wN3VP-000XpF-06 for pgsql-bugs@arkaria.postgresql.org; Wed, 13 May 2026 06:55:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wN3VN-0085JM-2Z for pgsql-bugs@arkaria.postgresql.org; Wed, 13 May 2026 06:55:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wN3VN-0085JE-1m for pgsql-bugs@lists.postgresql.org; Wed, 13 May 2026 06:55:41 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wN3VL-00000000MPg-152U for pgsql-bugs@lists.postgresql.org; Wed, 13 May 2026 06:55:41 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id C34FBEC01F3; Wed, 13 May 2026 02:55:37 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 13 May 2026 02:55:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1778655337; x=1778741737; bh=wh7ps9bREW aR5UN0/QIgAnAZDGGysuUj0a79HF8gAZs=; b=MGZvLDwkPrTPOUmSbTD+pwpstY xyg544oHCS+oOcZQBcoGeYomJz2YQg60dEWMMq6R3hUoPq3DeR5TzqS5+LiXOZ0v HH3CAOcSFxnIVFerl9nR2jJw4mCx0enil+Tbi8GcVPdwb9Ueoi/r++miYkZ925Sq I70lUebSO/epYZNVhR3FXUDKOuNmPySJTMsGaf6Jdp07d1GGJzp+Si5UaVgUXbg5 T3xzP8Rd9nzKVGXHiubuVvrwJvWm/C0TCloH2MeLkE9nBIrLbBC8wDT7CIGyutLi T5aVUqXWKEth6Chd35lgrCOndT8Zn0JK6d9VqKjqyCdq16j0xAs1Jd7hwVnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1778655337; x=1778741737; bh=wh7ps9bREWaR5UN0/QIgAnAZDGGysuUj0a7 9HF8gAZs=; b=c9zIt6a8PweLdnZyGt1PsbffxRG5jItVIUA5s4GLgzQoXlTg0Fi xTCMIjYp2BRFjepEbvnsjLVI1DbH3JHGF6N0zgN0mQEjC2ElH+/BMGGNj6e+kY3/ cNznokGGo1I71rkyLEXwaQfpG1Ir3epZP+nMRxOEzUc9SxSJfp0G79I5npPdevAO taWlEG04IGqpTx/JYs5Q5ZmLHrl5SsBtQKCltZWqxZ6jbcE3d2Md9SAT4KQhWo3q LdzeVsnrgo7rfbGHA1ZlDjkd/NUxxhWV84+L6Ly+7wIoEQTcA+Fm9Ri+DwMD78Fz 6p4y3g06IKVrzblsYyzMzJomYpnOg8B4uag== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduvdegtddtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgihunh gvnhhgiihhohhusehgmhgrihhlrdgtohhmpdhrtghpthhtohepvgigtghluhhsihhonhes ghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdgsuhhgsheslhhishhtshdrph hoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 May 2026 02:55:36 -0400 (EDT) Date: Wed, 13 May 2026 15:55:32 +0900 From: Michael Paquier To: Xuneng Zhou Cc: Alexander Lakhin , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18158: Assert in pgstat_report_stat() fails when a backend shutting down with stats pending Message-ID: References: <18158-88f667028dbc7e7b@postgresql.org> <58b5d6bf-7dca-41e5-8000-e12981205ada@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aU1g07QWYIWtU02C" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --aU1g07QWYIWtU02C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 13, 2026 at 08:46:25AM +0800, Xuneng Zhou wrote: > Thanks for reporting this. It appears like backpatching an equivalent > of 87a6690cc69 to REL_17/REL_16 would resolve this issue. FWIW, I fear such a change in the stable branches based on its invasiveness, particularly because the area of the code dealing with shutdown sequences has been reworked a lot lately as far as I recall. I am seriously wondering if we should just let it go and remove the assertion on v15~v17. It's not perfect, of course, but I value much more this assertion in terms of any future work that can be done with pgstats, not in terms of what we could detect for bug fixes. -- Michael --aU1g07QWYIWtU02C Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmoEIGQACgkQnvQgOdby QH2+rw/8CBIjNpvl9kOFVOctNFvoRuYLr33ChO6ZpVkDYuukFxOBELcTLDdihB+d XlWa1VzM90fRCjngijAyj6VjllOhc0zdFtQxRaeJsv0SyKAtqeaJ9PFHHPCjFov7 aHw5ir8JuyYv3IioNt3iFAvkp1zhMdOkIyZ09mc+sMg0rzCHJCTpZq5i/e/dIRH7 e7ISLUFpKeezJkkiFin/2GstB6GQXY8/osI0HVChYFoi692+ZZdZzsrkXya1mI0S HiaCA7P9H/aFQPcxflg3rUggFrD9XVjRt/gA0HZhpVmon7eFLqJg2DuZmTK3trqB yWSFQx3+H4FN+qW6zXI6AuM1ERBMbghLW1zAirBKeYcYJBk/sjkuoJn4AjE+53bE +6BsuNxkRExv0V6exBHHpbqcgVxsGBIh4Tb3jf9FP03u4vlGcAce0GD6/pYGC06C eYp7RNrPF+E8yrZaR4dpWApUjL5WUsMko3mRcG7HO2SFuQU0x6mQfR4BKNW7SCFA P7hJUcHW7SDRNqDNZec7NTzynBDHzRcxBe1JZRjCgxwD8bFDx9qhTP1cCg2v7/Ro X4t6eh7Ma4dWMyPSSofRwotwpePADIAAwMrmoY6LKvgzJpLeA/3nTD+5qm+6K2D/ 7QRmxBhRlekZEJE1eOR+ul/At92pTjy3kpYmvY/w/Ezxsq//zF8= =XeNy -----END PGP SIGNATURE----- --aU1g07QWYIWtU02C--