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

Christoph Berg <myon@debian.org>

From: Christoph Berg <myon@debian.org>
To: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-07-06T13:11:18Z
Lists: pgsql-bugs
Re: Peter Geoghegan 2019-07-06 <CAH2-WznYXDG6aANoag5ixoMrV=0bD-W5i9cVq4cRkb-fA4xRmw@mail.gmail.com>
> > 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.)
> 
> Obviously you were right to adopt pg_upgrade tests that cross more
> than one version at a time. Thanks!

Indeed, and running 9.6->10->11 tests (that were present before as
well, but never run) revealed another bug in pg_upgradecluster
itself... Testsuites are just awesome.

Christoph



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