Re: BUG #15896: pg_upgrade from 10-or-earlier: TRAP: FailedAssertion(»!(metad->btm_version >= 3)«

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Christoph Berg <myon@debian.org>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, Teodor Sigaev <teodor@sigaev.ru>, Alexander Korotkov <a.korotkov@postgrespro.ru>
Date: 2019-07-18T20:57:50Z
Lists: pgsql-bugs
On 2019-Jul-18, Peter Geoghegan wrote:

> On Thu, Jul 18, 2019 at 2:30 AM Christoph Berg <myon@debian.org> wrote:
> > That version works as well on 12 HEAD. It passes "check world" and the
> > Debian testsuite on top of that running 10->12 upgrade tests.
> 
> Pushed a slightly refined version of the same patch back to the v11 branch.

Thank you!

I wonder what the consequences are in a system that doesn't have
assertions enabled.  Do we just end up with an "upgraded" cached
metapage, and no further ill effects?  That seems pretty benign ...
I hope we don't end up with an expected v4 metapage or something crazy
like that?  (I suppose we would have noticed.)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. Fix nbtree metapage cache upgrade bug.

  2. Make heap TID a tiebreaker nbtree index column.

  3. Fix handling of non-upgraded B-tree metapages

  4. Skip full index scan during cleanup of B-tree indexes when possible