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 1wWSrB-002dJI-1B for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Jun 2026 05:49:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWSrA-000s6u-14 for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Jun 2026 05:49:04 +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 1wWSrA-000s6k-0F for pgsql-bugs@lists.postgresql.org; Mon, 08 Jun 2026 05:49:04 +0000 Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wWSr8-00000001qqi-09BF for pgsql-bugs@lists.postgresql.org; Mon, 08 Jun 2026 05:49:03 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 61059140008C; Mon, 8 Jun 2026 01:49:00 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Mon, 08 Jun 2026 01:49:00 -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=fm1; t=1780897740; x=1780984140; bh=Fb4rIVUeem P2ezRg/No7WX22cCCJaJP2Z0/gU6aqgKI=; b=G51Q7ciBEQPcclXt8iLr/u+zd1 cJpV53rftztbf9Hgiug8u7t1AFPR4jPC3yILxHt7AKhPMP4K01KNGJl2KlWEd5yE V28Zy38CJHmrXGehXxgnjWH4RSkYL5LHvCsRvLPwi0CV1PoYWvjuKZEqWWpFzbu5 J/9n81O47XMjd13Iyx0ZFbyjHtjZkCE3mrD6kVn1+jap7OWfZ7h90lX1RYidCxn5 RYs0ZQLhY+mtkde7uqTvgq7nWHPd6C3q3QMGrIFJiwlQWeNEwfJkfxBtEwIpdy7L GhFNUh9ZOlWmAtJIFktIessh6J84NYejkLgocQm/EoOEWqjRcqgc55ivJUIQ== 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=fm1; t= 1780897740; x=1780984140; bh=Fb4rIVUeemP2ezRg/No7WX22cCCJaJP2Z0/ gU6aqgKI=; b=E5A0aX4jVy2csf8lSpQJtsNAkNlszEdOGPXDI7J9NTcN1ZVPlca KJrRbTmWl1/bIK9xvbQgOdEd8aJU2jQ5yufhaOWhD+x2e+5LQrOsYP25ABjjF+R1 DGX60JV3VA8NTnqZmFaUPcFEeeo01i9OIPAODNAwoIOEgyunxeCPh4qWk+kcRbjU 6V3yGHRlTivQpsJJBJqZAujgAhkHsEs0xmE3vYnwZ7+rLBI36dF6mdAVpHzDiOGi jLw2DPL9oIHEyCWmj6bEVeyDa9whWctQLFSt7djMw+n39oK53VelrJWMnfbnuXnG bgCYBeRn0szZyjfDMpE1P4iI2orsbW1qaOA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFAeJBTaTyx6UspVx+0UEOxqSDFlSWmYnWQ2mwiw3br+IerfASd4gIvJ10b2CtEjW riFkLpjGtwSMPsGUZuHYvz+Q2rK91f1JviMnSN5w5H5VxfY7tkNAy0u4yXjbARBvoG3psD EpjqwPoZtMCOgM3vEPLAMXBys+KiA60Jp/RJTCC03T3NikHXno+JbEm64xvroLOTWVyoPC 6BMex5pkooupUJWRTk96vxrfkbiDQEkcLnzQ3QpAfU4Zi3Yfma+6gN1/sdRNwosNhyerWh 33qJlBl/PikGZ/p2EX6fWpG5it5fpAEKSdEQqaXkiQU8egYh5ai/23AfWMO+hUteofqmoG MEkmQDo32tveGENIVgOrJfi9Q2rt5Yn/VctjJO0nvFT7oQcFV/u0IKeW2sdTfMahPX/HrC bEqaFfMW/22Q32QQHtlJp16m3DSrDTN2sLMuyPmgCW6xu1a9SgvY+5p826T8UQv1dN34cD 6IwoAEh4S8LCrfemO+3g/DVxzcgmqAuIZ+B10ObekiZwJni990W5GxedID/ios9yJ9BJPZ UnkV5+nTzx3F4nhyzmn6Qzkz6RlvQFmIy9ovSzVa2zN/Xh2m9mLyiJOWaI7JWKixl0AFpn /+HchyklXvQUMADLY5W4gzvaIwfMJfkUrLeFBkGjByQrDhiuUQy83MpJnVDQ X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Jun 2026 01:48:59 -0400 (EDT) Date: Mon, 8 Jun 2026 14:48:55 +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> <5edd4f4a-0d79-465d-a250-8b4735f780ca@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="L0ot08SnqK1O0WPc" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --L0ot08SnqK1O0WPc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jun 06, 2026 at 08:45:26PM +0800, Xuneng Zhou wrote: > Sorry for being late. One nit for the patch -- would it be better to > use AmWalSenderProcess() for identification to save the include? > +#include "replication/walsender.h" In the startup sequence, MyBackendType is updated to B_WAL_SENDER a couple of lines after am_walsender. One or the other don't really matter; they're both right. -- Michael --L0ot08SnqK1O0WPc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmomV8cACgkQnvQgOdby QH1ErRAAiepKLdmEJcXvs1q8K0mBY549ssPg0EqdHrOCQVc1AMstnaIsknzrHZ3J OZ5gEM4gsLmmLxX7x1R8VNjbhOt7/iLasKkGy//qUEREoAuUavy4gYfq9kUMWQOC 9rTuiV3w8j/EtwSJEKzlJ3EJTbSAE5waLz0DfGnG8ARGknA8wmnK4d2FS+Q2IX3b kM8EmVb3fV2efMe0hn8Mvk57I3xKNH/GsHK7Tm1syZe0y72ePxt0LerRsf1BAea6 UvlX81ND6IIOCXFMP11P5t6iajNinY3wGQk0Bemjm6BiyjlLIm/jFD8y+utomIKv FPUlIgp+5+SjE05WN8gZUoMJ6slsFDFxbsv+OCIWn7EAOWxetLQqwhF2eLPhlgLn Wsnj/LJrmPZY4ZArx7e7ps35xIwEbba6RXYMKw9IJu6q+oIQTI3lEhCZ0TMKtZjX BTOEuXw0y7d7+KG+aztOOFJDG+kjiqzh23DFOlEM3NuaDBTMy5gJW5H8zHFiQlE1 37/FqXGYCFXS5uOMoYUgsubSnsBmP42m5CseSzl59ismZcUSorAS4G8TDLxgUgCJ G9U5DZ38ADZ4dXQSBDFdu1F5+12if+4P83sfdDJtFw8GV2eyEmEkt1qbQ0T9YfYj P8ZTw4VIeqGhPsR75X5koXdPtbJ1vRWvVhw9q4RPRXnj0571aB0= =/7HO -----END PGP SIGNATURE----- --L0ot08SnqK1O0WPc--