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.98.2) (envelope-from ) id 1xAwri-00000002v4l-3Bmf for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Sep 2026 21:56:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xAwrh-00000006ryL-2vRZ for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Sep 2026 21:56:57 +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.98.2) (envelope-from ) id 1xAwrg-00000006ryB-2wJD for pgsql-hackers@lists.postgresql.org; Sun, 27 Sep 2026 21:56:57 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xAwrd-00000001dN3-1Lmv for pgsql-hackers@lists.postgresql.org; Sun, 27 Sep 2026 21:56:56 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id CCDB51D00064; Sun, 27 Sep 2026 17:56:50 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Sun, 27 Sep 2026 17:56:50 -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=1790546210; x=1790632610; bh=MQitOLkyNy 3Od1B5gBYs/1F3HuFKafr3rBIiAx1L8m8=; b=ieU/YqEyUyzkzangB9yBi8B6HK gh9rA0Fbdw23MLlRxPY7Rx28eqj9fa9w7ZmWFURSRcHJU4QUhnXthAcsb2hleWP9 MuNkhg0qDLTlgjeITQjSNVoR3EmmiZueoM8nbjqhFiUrff5iQBV78GWMox/sVWLm lBEXfBaw/GEChPh6fzYDQa3lVPb+hvcrY1uBGh0XBY46fgrTyANiuGbuvaxhnz84 +2G5p77kt99r3U/U2/jWpaDs3sXdcyotRbzJj2ukQoD2RRQJoyKmpu3yt5nsAsP/ b3v1y91VcD3OzoM1eAzooWApdvOGm2ZS+1eMB2k1fC/1/x1Vo3qC/pLt4Hcw== 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= 1790546210; x=1790632610; bh=MQitOLkyNy3Od1B5gBYs/1F3HuFKafr3rBI iAx1L8m8=; b=Ez+SR1uDtHqbk320KrVNomvgCLPx9sh29cC7o5gY7xIfZ3XYim9 OM/SsXOuCSneez2TVK21iM9uZomu45+aCKdfKBx1rnURdacaH5DPVk+uXlXqBMv7 xMRXDpuK/CHTpVeP0yBuvlGeqWVG/arOplBVZSM+DWcoPHbgrqtLjhiBDus1uVlc 7nXD7L71HG5O0M7Zf8DP04eZ3My3usL+ZsfMr5AnuK1QaJaTBasUF+rIk0aguXs1 mfA/uAII3XNELHa3VVzkGAWt7gEbKf8+Efu8WipxSGxHuZgkvIMsEEeEM0kX9fdY 8uCr2deajb2km16K+shBZBTt1uvd5UspdDw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEC7tyasRAmKNQDTM/Q6/lDTdgctJ7CtrvfjpCaf7PDv608wceh3wH4aHRq9+HIl0 q0QtqzPbZiphy1wrHZOfOmAnSZGcISC2ipt2hBaRHEKdVCi6y/rjUruY2G9YcW/BDKJdbM g+8jV8EE4tLYdVBb1VXugHq/s/BrF0yd/J3ZEzV+Dla6Rw4M8DrBXkEDo6SJO93gBZ70oS 7JZ6zCKluVTEFzW0ANbiQVnJ7ahr8fUldzIuz43mXLarZ1vIKsuZdSfg22CQ9fAiLF/bYq B7K25W+M5FEPJPhDBih/teiviE7I2p0aSF4y1XWCFh41nzha2ofJAoa0VOl6wLKav7L3L0 I39/Nmxy8BYv3j35sqNES7/jXCbOXX4K/iWlNQTbpHUx1f9vPtF/yuHXvSAO5dy3CN/v4+ GFxwPr4ajtgDRdMGioJOoGrVC9b83m65jqShspAEI96FE0LnqPlNQ5Newh445FeTTiazyK O/RXqtmvlsg0HXn/Tp3pnVNVaKvM7GEuTGWH9bXmPtZuPQ8821LE/qVO3HczRwUM1YrhdJ lWfchxQ8EUr5jLMSRP7wSWtZen14vqF15BYpceFOzu/AgTzivlBbHPcAELbEJIePyhjPy1 sja3hctm+91GQ7izbKJGM/xdAtlVxgrCocNXcGLK9dafxbqLC2mF2PllvZUg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 27 Sep 2026 17:56:49 -0400 (EDT) Date: Mon, 28 Sep 2026 06:56:46 +0900 From: Michael Paquier To: Matthias van de Meent Cc: Bertrand Drouvot , PostgreSQL Hackers , Sivaprasad Subject: Re: BUG: pg_class.relchecks overflow, making table undroppable Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3tISHIQaJqaO2E4A" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --3tISHIQaJqaO2E4A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 25, 2026 at 02:33:57PM +0200, Matthias van de Meent wrote: > Also done. Thanks for the fast replies. >=20 > Attached v3: >=20 > * Add errcode(PROGRAM_LIMIT_EXCEEDED) to the ereports. > * Use pg_add_s16_overflow() to detect the overflows. > This includes changing the type of local numchecks variables to > int16. SetRelationNumChecks's signature is unchanged. > * Move the overflow checks to before StoreRelCheck. > This saves one dirty tuple in catalog tables when that overflow happe= ns. That looks pretty good here, so applied and backpatched as the consequences of keeping an overflowed counter can be really annoying. -- Michael --3tISHIQaJqaO2E4A Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmq5kR4ACgkQnvQgOdby QH2rHQ/8Cq0Fsa61M59zkAbdkBudYCKV4HwbHQZN1Ds5XmVgL4ZmMt8EAPEFTbVO hy510bsHduYO1WMCUycFpQczwQpyUS0YxaMppjFeXt/yM1nDksTBH/3axJN2nlfr SSr5nDYf77DOFymJ1BIMtzuXCjrG2ZmZDMmk0AeJQ11c04MzuydRd1jh6XiDdQfJ D1ykCn3vgILzfih/OE9Gu/hGF5N+bgb7Yobk7eNHFlI9zaY4CX33sSWsbKAriuVg Lw5v5A6fJDu0L9LxOOGDVeQueW3KHA5t7El91Zl4ocZyx6Rrp3aauQjC2ZW59sZA 1MgF9bc16m16lz5E/Ga83rUDzmzJ67sONSv79cWgDH/loA4Hhw7bOxH5Qd0pxyC/ kv8Z09NQGyHWEryxp2iY4XYWe6fchmN6tP0rjEM7PF1EHQAZuWmuV2eiobfOjjs3 F618IoD9tecAOEMdiyi1wJIk8nU60yJMHKo2XnjeD5fSHVnD+mvJLPiosQ9kEQfA Ik3DQmSenvwcInYAh164Rh1ZztlOxP2uFYKnXNoI4tK8WNkWlX17260wGGNnzWbo ro5/m8nZ9FrnqNqY446TnCBQu41YmsbZVXkGhiv7Bgth632+eKPQK8PSZrDt7PNe KSy2zbNJKp/X6d4GThGUYCNx6TniyfPTGyv1jXEqRpfM0VkLI6o= =5ENU -----END PGP SIGNATURE----- --3tISHIQaJqaO2E4A--