Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlUFO-0003FB-F6 for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Jul 2019 08:16:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hlUFN-0000g5-3e for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Jul 2019 08:16:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlUFL-0000aT-GW for pgsql-bugs@lists.postgresql.org; Thu, 11 Jul 2019 08:16:08 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlUFE-0004wh-Pv for pgsql-bugs@lists.postgresql.org; Thu, 11 Jul 2019 08:16:06 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D58B021E56; Thu, 11 Jul 2019 04:15:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 11 Jul 2019 04:15:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=Q00rtwYszBDa7KYjwx1RGrTaNUS KJwVoxQRXYJoTdiM=; b=wnqfrozmJ/s3NwVEdKF9IUoScNdDJPxbvEhYDi4c/S2 lgPJGeMi0POY/6R//uDNz+vYl6f/T0+QsNpI0NlRBxSWmn5T3m5dXA3ZGney9B+D TQ+VG3ebItVSFJjmm8504jvEC1YLZwejcfWhnnHhk2kzyEnMhKIVhgzeQ8ZX9ZqZ jxX2mAsiejjcFMN7szEBAA5c6g0zYK/mOmnX89EQElfdj0dQkewUoSSWlwFnt6DZ ALvV+ViHfwMJLf/eO/b9RMuCU6BjICHP41CXCVGfLAPSo0kkEktK9rcW+oZ/7eju kcy+LZmql8GvukFXxoRRU9RFwiv+EiHNTfFMPLJ8LTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Q00rtw YszBDa7KYjwx1RGrTaNUSKJwVoxQRXYJoTdiM=; b=cBgx3SqF0C4ZQ5EKmrrG9f EmQIqIOXyLB430fYThtVWtTeNZxrEj7jVqqxmvVeRCnEzoRegYvF4PqST2v3dZBj nvHv+Oc1AsluZ81vIkVFzd4PVMJeuysT14REWcXCZpGwbnpTM5GtsTEHSjumzX1E D9Yu1NKGYiGX3IP2X7QXdJNWDrqRGhCRTUcGGa3A2tuJt2ci+idtFc67DIOyxVHc dzbVQ2UBiEN1HDVng/yq7y74t0Jy1kr7WNLsv/ZuaI+ZONhD/Hn2vAq7QQl1jCYK F5szt4JsFQhV73zH9cUsmGA/PHal8rIRADezq3bb2QkGw+iFX3/+qDoE9vAxk2WQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrgeekgddtfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeduuddurddutddvrddukedtrddukeehnecurfgrrhgr mhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluh hsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id AD0E380059; Thu, 11 Jul 2019 04:15:56 -0400 (EDT) Date: Thu, 11 Jul 2019 17:15:53 +0900 From: Michael Paquier To: Peter Geoghegan Cc: Alvaro Herrera , Christoph Berg , PostgreSQL mailing lists , Teodor Sigaev , Alexander Korotkov Subject: Re: BUG #15896: =?iso-8859-1?Q?pg=5Fupgrad?= =?iso-8859-1?Q?e_from_10-or-earlier=3A_TRAP=3A_FailedAssertion=28=BB!=28m?= =?iso-8859-1?B?ZXRhZC0+YnRtX3ZlcnNpb24gPj0gMymr?= Message-ID: <20190711081553.GI4500@paquier.xyz> References: <15896-5b25e260fdb0b081@postgresql.org> <20190705154908.GA27420@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="utPK4TBebyzZxMrE" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --utPK4TBebyzZxMrE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 11, 2019 at 12:18:46AM -0700, Peter Geoghegan wrote: > On Fri, Jul 5, 2019 at 3:14 PM Peter Geoghegan wrote: >> _bt_getrootheight() is mostly just something that exists for the >> planner, so it has no business calling _bt_cachemetadata(), which will >> "upgrade" the cached metadata image from version 2 to version 3 if it >> happens to be on version 2. How can it be okay to upgrade the cached >> version without also upgrading the on-disk/shared_buffers version? >> This bug was hiding in plain sight. >=20 > CC'ing Alexander, who was also involved in commit 0a64b45152b... So the problem has been introduced in v11 per this commit, still we only see the issue since v12 because your code relied on a wrong assumption. Per what I am reading, it seems to me that we should fix v11, but that's a live problem for v12 because of the page format upgrade so we need to track it as an open item. -- Michael --utPK4TBebyzZxMrE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl0m8DkACgkQnvQgOdby QH1MWQ/+KjL2DnPY9wNeZhwqri95KA3W95Oco1p90F1REoJ8Dh2OUW4QSOHA50BW dQY7hhMbkVgM1psez8c1qbWlhz7S3TV+ISn1KBIzKRugCp5f3iFk3KfevD/l+Zs8 mWGEHas9+LUijMtb+jy/McerFHCjKyOHDLU3DjfByH2/5/7Y5qA3d0/CvCI/tli5 TQG9Mx8Jf9VtokPsHqfX8TVCDQCH8XHn7w/N+XnyF0MAXTI+2uqNvU2PZhmCR60Q Uu6fmay/HaHLhmSHiR2mSUfqW8RlEgiL4h+tpMPr94yz8KMNjekX0XwtpwDMpXnt QOJpVEicZg4Eibx7t01X+L0KHRPlFH4CpGQbbflhdvt5Ob6R7VPtg/rE/hOJO9hz fp/30KCjjXwd1GRV/9m/q0cNJEl1rfyHChOekokstOjmrENgwn863gBZbJrQ4yFO G3HAh+m2Dh0YxBw3o/ARsutkbtd7Y0FknILX8w6Zz1mWF4Q+6w3mL7CSxMHetYBo YZPakhUvoh79K6SnF1YUb3fmaUYAQs5NPnxulhr5y9QJ4k93PJoTaooo7IZUYElS 5d5gDXlFSQO3/zsI7xlm17FNawgWAFco8CoTVSOS7YK9nbdFcP8ibilijYJkQJlO mMg87E4Gbvt9OZbsfNBznBC6vjD/iftdfh4JOZVdA4jmPMh69EA= =4lo3 -----END PGP SIGNATURE----- --utPK4TBebyzZxMrE--