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 1hjQSa-0005jx-UT for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Jul 2019 15:49:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hjQSZ-0006oF-Ot for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Jul 2019 15:49:15 +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 1hjQSZ-0006dl-5z for pgsql-bugs@lists.postgresql.org; Fri, 05 Jul 2019 15:49:15 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjQSV-0006aw-Id for pgsql-bugs@lists.postgresql.org; Fri, 05 Jul 2019 15:49:13 +0000 Received: by mail-qt1-x844.google.com with SMTP id j19so11531375qtr.12 for ; Fri, 05 Jul 2019 08:49:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=qGaGdODCQJykBXmGJM6NDfHoikjVdytEwkLRNz1K9Ew=; b=Z3AtXe8l9kSx5DT0uC72LyFRWFQ2nbWGK9EJOEcfv9RqRi0IlTcc8x/FArwr9aUypI oY5RmfuQmmsKvzjia2qk1znnjX8XijbKE8+UrdErhSZ7m8W4tQeLXDX4kxiMxQHyxgtw 8FK2tHlVPicgAAeZmK7/V/gCJW9C86iTVX9Dp3KZ8vAl8j2ewswcOz4JFnI2fcHVCSQW PGZzHbIGL5AQfAax+KYfLAEB/h1twnmzPSiKdxjtnMfenli4QQAYL8cS/BvTHhdDVTFc 6L41ctVTkhhkWthjC0dRQRPVyx7PaPJHBZzjSYBgeTJ/O/I3CKKWzCeC48DA7ldwVXka hPVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=qGaGdODCQJykBXmGJM6NDfHoikjVdytEwkLRNz1K9Ew=; b=GhQNQQvEtQTOWUQl3dHh1bPMiU3ydzZ4dz1a0tvv6XV0eVK+x0EnsG+Oht+UYbEQ3p uGXutvGHzOThL8AExmyGYQgB3uzXYLsSFFcWhZ++3q9HX+KetpbCaHq9S4+XeD7PEVqy pPyV1y/QwMYfjlQnJcSXC98cOkbyhIDeYLPJCOjNoQEHcwy5ArAdSVJ9E1fUtaoR2S5P qQE/PqbN4Y76qvoUVoY+l2IMy6dbtcH8nSf+B+dMbgewbHmCQus5sJYV6EbfcCFn8Wh6 haL86vPoogdVjKKNLqT9SfR2JtU1ciSlwZG2lR7ph4nQdYjSpGr36nEX+GSqYgK2WDW8 ooOw== X-Gm-Message-State: APjAAAW8YaSDYa8QQrVhKii+xYaue0wo/aB6OX4541xKbK+9aNgXn+js SxwD74pDbQn4vQROSPW96qAT4g== X-Google-Smtp-Source: APXvYqzqWQL1elP4i/T1Hup41aCIaPTla/e2iJRgDrGOw0b83QBFX95hQeH7pSmqHpJliejMMBN5Wg== X-Received: by 2002:ac8:7459:: with SMTP id h25mr3137777qtr.6.1562341750883; Fri, 05 Jul 2019 08:49:10 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.56.30.174]) by smtp.gmail.com with ESMTPSA id d141sm3830666qke.3.2019.07.05.08.49.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 05 Jul 2019 08:49:10 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 969F3120A9D; Fri, 5 Jul 2019 11:49:08 -0400 (-04) Date: Fri, 5 Jul 2019 11:49:08 -0400 From: Alvaro Herrera To: myon@debian.org, pgsql-bugs@lists.postgresql.org Cc: Peter Geoghegan 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: <20190705154908.GA27420@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <15896-5b25e260fdb0b081@postgresql.org> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adding Peter G. to CC. On 2019-Jul-05, PG Bug reporting form wrote: > When pg_upgrading from 10-or-earlier to 12beta2 or 13devel, an assertion is > raised. (Spotted by Debian's postgresql-common upgrade tests. Previously > missed because we were only testing version+1 upgrades.) > > TRAP: FailedAssertion(»!(metad->btm_version >= 3)«, Datei: > »/build/postgresql-12-3URvLF/postgresql-12-12~beta2/build/../src/backend/access/nbtree/nbtpage.c«, > Zeile: 665) Seems that _bt_getrootheight is too optimistic about the metapage version it'll find. I suppose this could be handled by just not caching the metapage if it is of the old version ... or maybe by calling _bt_upgrademetapage(). -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services