Re: [GENERAL] pg_upgrade problem

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: depesz(at)depesz(dot)com
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] pg_upgrade problem
Date: 2011-08-26 04:18:55
Message-ID: 201108260418.p7Q4Itk17514@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


OK, this was very helpful. I found out that there is a bug in current
9.0.X, 9.1.X, and HEAD that I introduced recently when I excluded temp
tables. (The bug is not in any released version of pg_upgrade.) The
attached, applied patches should fix it for you. I assume you are
running 9.0.X, and not 9.0.4.

---------------------------------------------------------------------------

hubert depesz lubaczewski wrote:
> On Thu, Aug 25, 2011 at 04:43:02PM -0400, Bruce Momjian wrote:
> > Please check the old cluster.
>
> Sure:
>
> =# SELECT reltoastrelid FROM pg_class WHERE relname = 'actions';
> reltoastrelid
> ---------------
> 82510395
> 71637071
> (2 rows)
>
> =# SELECT oid::regclass, reltoastrelid FROM pg_class WHERE relname = 'actions';
> oid | reltoastrelid
> ---------------+---------------
> xxxxx.actions | 82510395
> yyyyy.actions | 71637071
> (2 rows)
>
> =# select oid, relfilenode from pg_class where oid in (SELECT reltoastrelid FROM pg_class WHERE relname = 'actions');
> oid | relfilenode
> ----------+-------------
> 82510395 | 82510395
> 71637071 | 71637071
> (2 rows)
>
> =# select oid from pg_database where datname = current_database();
> oid
> ----------
> 71635381
> (1 row)
>
> $ ls -l 6666/base/71635381/{71637071,82510395}
> -rw------- 1 postgres postgres 0 2009-10-12 06:49 6666/base/71635381/71637071
> -rw------- 1 postgres postgres 0 2010-08-19 14:02 6666/base/71635381/82510395
>
> > > > > One more thing - one of earlier tests actually worked through
> > > > > pg_upgrade, but when running vacuumdb -az on newly started 9.0.4, I got
> > > > > error about missing transaction/clog - don't remember exactly what it
> > > > > was, though.
> > > > THere was a bug in how how pg_upgrade worked in pre-9.0.4 --- could it
> > > > have been that?
> > > It was done definitely using 9.0.4.
> > Good.
>
> Not sure if it's good, since it was after the clog error was fixed, and
> I still got it :/
>
> but anyway - the problem with 71637071 is more important now.
>
> Best regards,
>
> depesz

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/pg_upgrade.9.0 text/x-diff 5.7 KB
/rtmp/pg_upgrade.9.1 text/x-diff 5.0 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Niyas 2011-08-26 09:48:29 Re: backup-strategies for large databases
Previous Message Ondrej Ivanič 2011-08-26 04:10:07 Re: Sort Method: external merge

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-08-26 04:35:45 Removal of useless include references
Previous Message Josh Kupershmidt 2011-08-26 04:08:24 dropdb and dropuser: IF EXISTS