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 1wmLFv-000jP2-2N for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jul 2026 00:56:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wmLFv-009Y8A-0w for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jul 2026 00:56:14 +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 1wmLFu-009Y6u-12 for pgsql-hackers@lists.postgresql.org; Wed, 22 Jul 2026 00:56:14 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wmLFr-00000000WbF-1V8w for pgsql-hackers@postgresql.org; Wed, 22 Jul 2026 00:56:13 +0000 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfhigh.phl.internal (Postfix) with ESMTP id BCE57140016C; Tue, 21 Jul 2026 20:56:08 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Tue, 21 Jul 2026 20:56:08 -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=fm2; t=1784681768; x=1784768168; bh=9Pe6x4+RrW Y0D55CfZF9uZRJlmr/7xT8vYOgGXbxENA=; b=PpCGy68S1Ctr3TUIqathUt2shS 0I37mgYQsrEyWBj0wh63A18IpzWZV5N8mMf+m/NznFufkg/kDz8h3QYWMryjo2aw XpR/VPz3S2ZBuVS839jojqhZdm0jop34uirdAhF4RgSaPZgDOItJqzSu3sB5ebVc nOI4j9c/VU/PaL0+Y8T0L3Bw2DQhrSr3Yvsuz2sC1DkPU0O5CrXPprZvg8IdcU6v hZ6bnXXml0WBO2/H8Cs+DWlE8pAyH5NvtSyKKFiBJupGow8Z5EmTkF8xHr0yl0Ay 3Ku1sR/AzsMjV9xm5njlbKgiBN85mJ+98aY7M3n0TfR32Zhgf2DW8VYoxmHg== 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=fm2; t= 1784681768; x=1784768168; bh=9Pe6x4+RrWY0D55CfZF9uZRJlmr/7xT8vYO gGXbxENA=; b=PyZRaDfJgEEsMyXjdx2cy7Vkk5q42i1U0t/kxS7mmoTEUnXd5Co yoFz5Vfm6uDYurXIRGjPbHrbClgvtGELJnwsS9k0lBrSzH6po3i1/FTpr66JeGiv kLke7O36IAYjiMRmcZzrMFmS2TRPxQF9K/Bu9jnTqiESvQTsul2qQXQOsJLH2D/A 2hZDGumSjzq4TEbwFz3kgneUg/t7kTbx0ARn5X5aLrqGZ6JHveTobrqvyx1E6e8E i7P1gOFc/Y3Zf1884S+ePaPDwsFUDjan+brQVwHKTukTq34G3cOVPDE7auPVGxwm W3+o5HZvOcVaSmNJFbrkti4oj3EZMSSijTA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGMVUMX9rXf0ekQH6GULWIef9DJcfH737ifz/T0EuePXaOdUrKOVdf7CzEUQ+XHsn Q45AMLqDtrYYh1CdcxRAZ8Sk6YmUVCt8Z0brW71OVr4ZdyBReMdmI8SK8avZ/abQtzoWCZ D21rtjD/i36BU0Wt+Qr7a4CHJl/iG/JWjLVD7sICPxUutAj+oXVy2+h5gcS4jL8AoyH7LP Skv08Hn71Izd59xaEbGs5oFazMqoyzk7FUs1kAh6Uqo/+3AAmykj9LCu2OA2oO65yNGC2L SU+ozkKR5+HWB9Rq6WBHsugaIu/+Q1gguc/YbEkdt85g5t/cHJbxa6GJGQ8o4/rXofQFUX GFMAH2+TO8GfJ/jy0Rtgfs8jkIcqNhcwoQ8pujx8+rSh8N8mY7IOcXXXU078XtpxwubMq4 2S05pPjxUutPvYKiU3C4rHtD/9UW2CUd7n0F+I+dT2Oa4OWmFYMsSr5HY84UaMmoeNjrXL X1kQwu3NEhMKwaf9RRKXhGg+NjnGvfKVvSIdZTgW0CVNZuZ864TMHLtqcakFoC6ydUAY8R T5pJT0AHCszMxlZukDv2d4cpU87r4SH/kNlvVaq9BeLqH109ObAsdO403mJC/IMxn3KPVN JI3ilGFYRth7H6m5S10iMpRm8p1FhP5ZurKshyKWRimGf3F1GtOGxpE6L0Pw X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Jul 2026 20:56:07 -0400 (EDT) Date: Wed, 22 Jul 2026 09:56:03 +0900 From: Michael Paquier To: Matthias van de Meent Cc: Alexander Lakhin , pgsql-hackers Subject: Re: Unexpected behavior after OOM errors Message-ID: References: <95c64dc2-3abe-4f4e-b285-4c681f565d9f@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/0hzF0OvKG5LC5pH" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --/0hzF0OvKG5LC5pH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 21, 2026 at 02:24:13PM +0200, Matthias van de Meent wrote: > I think I found the source of these Asserts; the attached fixes it. > The problem is that we're registering the type entry handling as 'in > progress' before the cache is initialized, and the error handling hook > for in-progress type entries initializes the TYPEOID cache if there's > an in-progress entry and the cache wasn't already initialized. And, > initializing this catcache in non-transactional contexts isn't > allowed, so the error handling causes the assertion to fail. I was wondering if this update should happen further down, but that led to an inconsistent handling of the in-progress list within the post-error callback. Looking at that a second time, just moving it down the initial lookup seems fine enough. Applied after an edit of the comment section. > Next, I'll be looking at the last issue. The pgstat one? That would help a lot, thanks! If you are not familiar with the internals of this area in the backend, this problem should give a pretty good introduction. -- Michael --/0hzF0OvKG5LC5pH Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmpgFSMACgkQnvQgOdby QH34Qg//cMdF2xQy6jyn+8dcSJFkCrv8U2acqJWakVOkCEUIaT9loIYM+n7H8AwE 6PnVL8wKheUq8DXOdjAFdSJ+ffBvxszjhb5ffYOjOeYGqRGmVwCF18zgwycm5lSV lCff0FB2lCB25XRoXo8jlqe6LpUp43EJU2haS+R0sNrMQIqLf3syrhO8vZNtDXUL ofu+24ZGx4uHN6+NDWAR5ng3PHqz6zseghAY3mVmsk7IHRqClpAj/3qJq34AOrio BG5KeqoEDPrRv8giJzvGd7zz3AezVzrTUfwtG8KjlG4cy4EBxBAutay0Ll8SZ0pQ VfhPV0gmTdQHtc5edyacYs3769Xiw+FhdELyTW+miAHeqmWFHOyL9/TfC0QebdTV UfBn8Nqq8etvptWe5dA1+M8w5UKL6JEpHzdP7duWHTWs1Zt+ANTRRcCeI6ZkduIr 8/l8Zqd/xzLT2SBnVPxBDOjej/nbiLAY5j81EZ0lawvmN2w1y8BZ7bKwSEzvxM/o 64NiN+KdmDY1kpta+2u7sK+8/37BACPm7kKo6yHQAWSjwtrLTpzBf8vTm6jEjO/6 Su7NvgW1oSieW6UFGC/gyxLXYewuYUGoFeGb3X0J1wHBXB/ETYhS1v3eVtGzb2mZ CXk86DZQC6O3h/Ud7c3X/Jvz4ofZv7JQLqFL9ZY8GwMqAuu8irs= =cacL -----END PGP SIGNATURE----- --/0hzF0OvKG5LC5pH--