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 1wNQMJ-000nZl-2i for pgsql-bugs@arkaria.postgresql.org; Thu, 14 May 2026 07:19:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wNQMI-00BGrk-1p for pgsql-bugs@arkaria.postgresql.org; Thu, 14 May 2026 07:19:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wNQMI-00BGrc-0u for pgsql-bugs@lists.postgresql.org; Thu, 14 May 2026 07:19:50 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wNQMG-00000000Ukq-13XU for pgsql-bugs@lists.postgresql.org; Thu, 14 May 2026 07:19:49 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-67f7caa33easo8268761a12.1 for ; Thu, 14 May 2026 00:19:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778743186; cv=none; d=google.com; s=arc-20240605; b=hGJNnHsYfTkC9luqnV2+tz5q/F/nRnWnSemXx8J06W2Mpe8HQs8ok76MtpfnK4jhlC fjx1oDk0K03M0zpE14V2MosvqAm4HOv98Zprby+vKsD96FQicNZRKhBBVbPNoL8PLBEp 1W4vI+H/rufnCZDjkGdtLNj7TTEA5gV6NmfMJOsCMD+rgVT5TFVDPthKCcGZxI/AC5eE 5UyuNHpPJ/ysXh0ri081B09RGJI6Z6ovKbxi5vompDw+H01ldqrEV29222gCQYlN2NEg vebtXpsjyTLk6pxqyw0OgZPvk5dzCdSTpauIiHRqT1rc82UaybGEyKOCGLLAK/KCjC7S lzVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Z66nkR5vuxTcuEmlIXhEKJk3G5wU6j3FXDge0Io3TjU=; fh=hMowDO933FnrGvxpoeiYg1w6fLlmJkq2yX0F5hq2WLg=; b=ZpzFub+ueeOPTKwGADlz3KApTzgDqBi8NJL1taTTG2c84KhJoznjgp/QdA5b6O+z4C AXUcTgP88AeX+LDhmn5aOCSM7ohiJ+APhvj9/G5sfZ1vaG8OiDh87V1CKMq+wzd1RPyA OcpNNU2oQKiUAva3k+NKRpQnVevc+zefPssBkMB6LyIDjPj33qhm93AWExj1Vfyb6m72 9G4azencPquFhBG9T6UjOUcdK7OmgJkh7xTSBjGqVoSRG9AFmEsaYbb+5HLDozj2NGH6 6yf3rXMq/LmWrvNAr6cneJVc9aaIb11HLiD7K7WGhNb111vU1M6NevsiR3wUpsDIourX Ufkg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778743186; x=1779347986; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Z66nkR5vuxTcuEmlIXhEKJk3G5wU6j3FXDge0Io3TjU=; b=gQvjtnYNDKZqgFAfkt5D5P2un0BXbZogV8fHWHsAYkVPbA6JQzt+NMoZ+57SrM+CA7 ru2zFqwiZVmzZ8eioyBsTfOYGKO3hJbi8yKglNRK0f2YvImbJxTSToe2BeidGVmXJ1Vi wDIFhpwXPaZNDYDt+Ef+sqZ/1uQmqJhlNFt0kGL+XNFw3pCn1jzYr/yAMvGJ53mR4tH8 yHEHAYAtV8OzMTNl1CPy9e9VrnqWIWUVNsHoLlEknf9j89qQjJyC1KwWv2CMkp36C8Yf 81c9D0dD/emsIl7EBfH3rrMvZFT1SMp2SMYiWoopAiMN3M15Ddds/WVE5AIwzl8R2L04 oFRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778743186; x=1779347986; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Z66nkR5vuxTcuEmlIXhEKJk3G5wU6j3FXDge0Io3TjU=; b=mvbVp/hV9EeIIH9Dq3lFAtwSUAVorl0BSTe0MOq11mTB+L/imdO81ImFbu3/QPmPZK Fb2nqWE84ArH9QaTP6H5xWjyRIlJID+pmdW3Yj7DbfJAbxfxjUZ9iPORtd0q3ldp/TJh xfLhJX/vEeCblq1HVGpwHyDpaVXei89wNj5Zr94LEio/8ctRMwSYKKz3NbjOav35m0ZR rWTUPa+y7v+eoqZG2JRU3Bq4Cz/XsnfNcL9JBvwttQvR/LfquKsTBJ/eMGPuZ0VofcIB yQyzCekirjRD+1u7OP0LkQfG2WM4A8XnmrV8hgTqWfkkmy6hTLLaqdKvTYSrY+fzb6uJ fAIQ== X-Forwarded-Encrypted: i=1; AFNElJ/u54Pmt9fMAgIv7iBHv3Z4z6N5T9mMG76RA5DZ0TXx4lmcaf9SLxjNCKGoylmU9mBQvv9nKGCKrgJt@lists.postgresql.org X-Gm-Message-State: AOJu0YxXnhdgMGjvdWkTqu8dwFTMXb4mvgMroopvRON+ICYsedgV8Z/q 7djKOGmewiCo3qPkm157UVesDmuSG0NF47nEYmfvrxw3PXZdQTKK8cY2vZxFyXJTGBu//sDihM5 1K+AXvoEaDOij7d69G973YSaVi5CnN1g= X-Gm-Gg: Acq92OHHwixjr9qygyJf+4T1x1SIsALo0ZZF7s8mYrGepFVgFOb6C2zwHbgpXgt7KxQ OV9/Le6+tTtZmhfpkdecWXGDO098tHRf2iY4rwrQ5LcfO0QMbICb29bMhqpvz+dmyLzBT+s+x5b auCjw72WIt9wOiBcMubYv8cRVxGpXPxsIhKRW2gl0oQncOQZNbZY2WG9lIUsjPTgzsC2BOqusW4 lIHnyQ7iLcjpddhYFlMM74A3tj3LXD7GivTgqNImvFCDQnh8oHW55jI8QHWyUgCgFjhx8mUfTeS bCeTyO2fSBG/GkZUOOmKoKviVY1WFs0hbMCW9+/QCbFad8WmaHvWdM8b3FYuA9xcq+LXO1GlVMu lYJu5cu9dUfXqiQtDK4EQQg8tbSTILILcOB67sbvE4DAxK8sKETM= X-Received: by 2002:a05:6402:1f8f:b0:67e:feb8:6fbc with SMTP id 4fb4d7f45d1cf-682a71ff18bmr3119465a12.8.1778743185596; Thu, 14 May 2026 00:19:45 -0700 (PDT) MIME-Version: 1.0 References: <18158-88f667028dbc7e7b@postgresql.org> <58b5d6bf-7dca-41e5-8000-e12981205ada@gmail.com> In-Reply-To: From: Xuneng Zhou Date: Thu, 14 May 2026 15:19:34 +0800 X-Gm-Features: AVHnY4KZ_eAZdmzcvKjhy_4qnTc5Ru9OQRcHEn4DYsEkZNJjka91D4gkGH6XJ14 Message-ID: Subject: Re: BUG #18158: Assert in pgstat_report_stat() fails when a backend shutting down with stats pending To: Michael Paquier Cc: Alexander Lakhin , pgsql-bugs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, May 13, 2026 at 2:55=E2=80=AFPM Michael Paquier wrote: > > 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. I agree that applying the change wholesale could be too invasive. If we decide not to address the ordering issue, removing this assertion seems reasonable, since the non-assert path does not actually provide the required guarantee. --=20 Regards, Xuneng Zhou HighGo Software Co., Ltd.