From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Jeff Ross <jeff(at)commandprompt(dot)com> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3 |
Date: | 2014-05-25 17:44:47 |
Message-ID: | 20140525174447.GF18867@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2014-05-23 08:23:57 -0600, Jeff Ross wrote:
> UDB=# \x
> Expanded display is on.
> UDB=# SELECT attrelid::regclass, attname, attnum, attlen, *
> FROM pg_attribute
> WHERE attrelid = 'masterairportlist'::regclass
> ORDER BY attnum ASC;
> UDB=#
> [ RECORD 1 ]-+------------------
> ...
A quick sum over the returned values seems to indicate that it's too
large to not have a toast table. Adding up attlen and atttypmod gives a
value of 1283. Considering that there additionally has to be VARHDRSZ
space for the varlena header and that the maximum storage size for a
varchar(n) is n * pg_encoding_max_length(GetDatabaseEncoding()) (usually
4) this seems to indicate that bad things[tm] have been done to the
database.
I suggest you write a script that does a 'ALTER TABLE $tbl ADD COLUMN
toastme text; ALTER TABLE $tbl DROP COLUMN toastme' for all tables.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-05-25 18:09:26 | Re: pg9.4b1: unhelpful error message when creating a collation |
Previous Message | Maxence Ahlouche | 2014-05-25 17:17:54 | [GSoC] Clustering in MADlib - status update |