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

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: myon(at)debian(dot)org
Subject: BUG #15896: pg_upgrade from 10-or-earlier: TRAP: FailedAssertion(»!(metad->btm_version >= 3)«
Date: 2019-07-05 09:59:13
Message-ID: 15896-5b25e260fdb0b081@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15896
Logged by: Christoph Berg
Email address: myon(at)debian(dot)org
PostgreSQL version: 12beta2
Operating system: Debian
Description:

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)

Reproducer:
10.9:
CREATE TABLE phone (name varchar(255) PRIMARY KEY, tel int NOT NULL);
INSERT INTO phone VALUES ('Alice', 2);
CREATE USER foo;
GRANT INSERT ON phone TO foo;
INSERT INTO phone VALUES ('Bob', 1);

pg_upgradecluster -m upgrade 10 foo
(runs /usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/foo
--auth-local peer --auth-host md5 --encoding UTF8 --lc-collate de_DE.utf8
--lc-ctype de_DE.utf8
/usr/lib/postgresql/12/bin/pg_upgrade -b /usr/lib/postgresql/10/bin -B
/usr/lib/postgresql/12/bin -p 5434 -P 5435 -d /etc/postgresql/10/foo -D
/etc/postgresql/12/foo)

12beta2:
SELECT * FROM phone ORDER BY name;
TRAP: FailedAssertion(»!(metad->btm_version >= 3)«, Datei:
»/build/postgresql-12-3URvLF/postgresql-12-12~beta2/build/../src/backend/access/nbtree/nbtpage.c«,
Zeile: 665)
2019-07-05 11:34:35.040 CEST [14325] LOG: Serverprozess (PID 14376) wurde
von Signal 6 beendet: Abgebrochen
2019-07-05 11:34:35.040 CEST [14325] DETAIL: Der fehlgeschlagene Prozess
führte aus: SELECT * FROM phone ORDER BY name;

Combinations tested:
bad: 10->12 9.6->12 9.6->13
good: 10->11 11->12 12->13

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-07-05 11:10:32 BUG #15897: make failed postgres 11.4 at 32 bit build
Previous Message PG Bug reporting form 2019-07-05 07:01:24 BUG #15895: pg_dump execution with OpenSSL encryption from Windows Service application