pg_upgrade and toasted pg_largeobject

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>
Subject: pg_upgrade and toasted pg_largeobject
Date: 2016-05-02 16:30:33
Message-ID: 20160502163033.GA15384@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

A customer of ours was unable to pg_upgrade a database, with this error:

old and new databases "postgres" have a mismatched number of relations
Failure, exiting

After some research, it turned out that pg_largeobject had acquired a
toast table. After some more research, we determined that it was
because right after initdb of the old database (months or years prior)
they moved pg_largeobject to another, slower tablespace, because for
their case it is very bulky and not used as much as the other data.
(This requires restarting postmaster with the -O parameter).

While I understand that manual system catalog modifications are frowned
upon, it seems to me that we should handle this better. The failure is
very confusing and hard to diagnose, and hard to fix also.

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-05-02 16:41:11 Re: [BUGS] Breakage with VACUUM ANALYSE + partitions
Previous Message Robert Haas 2016-05-02 16:29:45 Re: [BUGS] Breakage with VACUUM ANALYSE + partitions