pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Christoph Berg <myon@debian.org>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Subject: Re: BUG #15896: pg_upgrade from 10-or-earlier: TRAP: FailedAssertion(»!(metad->btm_version >= 3)«
Date: Thu, 11 Jul 2019 17:15:53 +0900
Message-ID: <20190711081553.GI4500@paquier.xyz> (raw)
In-Reply-To: <CAH2-WznBT+ZWtNi=iKDVB7JD+tF5TzO0kC6f4giLhRPZzmndNA@mail.gmail.com>
References: <15896-5b25e260fdb0b081@postgresql.org>
	<20190705154908.GA27420@alvherre.pgsql>
	<CAH2-Wzmj6pz98qZ6+Ro-=tHvyBJ6q0yxHV8QLOr6O0mE20Nw9Q@mail.gmail.com>
	<CAH2-WznBT+ZWtNi=iKDVB7JD+tF5TzO0kC6f4giLhRPZzmndNA@mail.gmail.com>

On Thu, Jul 11, 2019 at 12:18:46AM -0700, Peter Geoghegan wrote:
> On Fri, Jul 5, 2019 at 3:14 PM Peter Geoghegan <pg@bowt.ie> 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.
> 
> 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

Attachments:

  [application/pgp-signature] signature.asc (832B, ../20190711081553.GI4500@paquier.xyz/2-signature.asc)
  download

view thread (18+ messages)  latest in thread

Message-ID: <20190711081553.GI4500@paquier.xyz>
Permalink:  ../20190711081553.GI4500@paquier.xyz/
Also on:    postgresql.org/message-id/20190711081553.GI4500@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, pg@bowt.ie, alvherre@2ndquadrant.com, myon@debian.org, pgsql-bugs@lists.postgresql.org, teodor@sigaev.ru, a.korotkov@postgrespro.ru
  Subject: Re: BUG #15896: pg_upgrade from 10-or-earlier: TRAP: FailedAssertion(»!(metad->btm_version >= 3)«
  In-Reply-To: <20190711081553.GI4500@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox