Re: pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3
Дата
Msg-id 20140523133620.GH31579@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3  (Jeff Ross <jeff@commandprompt.com>)
Ответы Re: pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3
Re: pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3
Список pgsql-hackers
On 2014-05-22 09:20:38 -0600, Jeff Ross wrote:
> On 5/21/14, 2:37 PM, Bruce Momjian wrote:
> >The only item I can think of that would cause this is someone changing
> >the length of a string.  Did someone modify pg_attribute directly to
> >increase the length of one of the character columns?

> I don't know, sorry.

> >I just tested ALTER TABLE in 8.4 and it does create a toast table for
> >this case in 9.4:
> >
> >    CREATE TABLE test (x CHAR(10));
> >    ALTER TABLE test ALTER COLUMN x TYPE CHAR(8000);
> >
> I just tried this on the problem table and it did indeed create a toast
> table.
> 
> I then retried pg_upgrade and it failed with the same problem on a different
> table in the same database.  Of the 67 databases in the 8.4 cluster, 5 (so
> far) have had this problem on at least one table.

Any chance you could, *before* you create the toast table, do a:
SELECT attrelid::regclass, attname, attnum, attlen, *
FROM pg_attribute
WHERE attrelid = 'a'::regclass
ORDER BY attnum ASC;

Where 'a' is replaced by the affected table?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: David G Johnston
Дата:
Сообщение: Re: pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Re: popen and pclose redefinitions causing many warning in Windows build