Re: --single-transaction hack to pg_upgrade does not work

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: --single-transaction hack to pg_upgrade does not work
Date: 2012-12-01 15:25:10
Message-ID: 20121201152510.GI27120@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 1, 2012 at 07:43:17AM -0500, Andrew Dunstan wrote:
>
> On 11/30/2012 11:10 PM, Tom Lane wrote:
> >Some of the buildfarm members are failing the pg_upgrade regression test
> >since commit 12ee6ec71f8754ff3573711032b9b4d5a764ba84. I can duplicate
> >it here, and the symptom is:
> >
> >pg_restore: creating TYPE float8range
> >pg_restore: creating TYPE insenum
> >pg_restore: [archiver (db)] Error while PROCESSING TOC:
> >pg_restore: [archiver (db)] Error from TOC entry 978; 1247 16584 TYPE insenum tgl
> >pg_restore: [archiver (db)] could not execute query: ERROR: ALTER TYPE ... ADD cannot run inside a transaction block
> > Command was:
> >-- For binary upgrade, must preserve pg_type oid
> >SELECT binary_upgrade.set_next_pg_type_oid('16584'::pg_catalog.oid);
> >
> >I have not investigated why it apparently passes some places; this looks
> >to me like a guaranteed failure.

I see now. Sorry. I was so focused on performance testing and never
thought this cause pg_upgrade to fail. I did not run my full tests this
time.

It seems the problem is that we bundling the pg_upgrade oid set function
into the same code block as ALTER TYPE, to preserve the type oid. Let
me see how to fix this.

Should I do something temporarily to get the buildfarm green again?
Just revert the entire thing?

> Testing pg_upgrade has only been in buildfarm releases since
> September 28, and even then is optional, although enabled by default
> in the sample config file. Looks like even I need to upgrade a few
> of my animals to do it. It probably needs to improve its error
> logging though.
>
> Seems odd not to have run "make check" before committing, though.

I was not aware the pg_upgrade testing was in our git tree; I thought
it was only in the buildfarm code. I am glad it is in our tree and it
seem to do my full tests in a more automated manner. I will use it in
the future.

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

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-12-01 15:41:06 Re: --single-transaction hack to pg_upgrade does not work
Previous Message Simon Riggs 2012-12-01 13:54:53 ALTER TABLE ... NOREWRITE option