Re: pg_migrator issue with contrib - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_migrator issue with contrib
Date
Msg-id 200906051950.n55Jor910233@momjian.us
Whole thread Raw
In response to pg_migrator issue with contrib  (Brad Nicholson <bnichols@ca.afilias.info>)
Responses Re: pg_migrator issue with contrib  (Andrew Dunstan <andrew@dunslane.net>)
Re: pg_migrator issue with contrib  (Brad Nicholson <bnichols@ca.afilias.info>)
Re: pg_migrator issue with contrib  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Brad Nicholson wrote:
> I've been kicking the tires on this a bit, and I've found an issue when
> dealing with contrib/ (specifically dblink, although I haven't looked
> around anymore).
> 
> dblink_current_query() is not in the 8.4 version - when I run
> pg_migrator on an 8.3 cluster that has dblink installed, I get the
> following:
>                       
> Restoring database schema
> psql:/home/postgres/pg_migrator_dump_db.sql:271: ERROR:  could not find
> function "dblink_current_query" in file
> "/opt/dbs/pgsql84-beta2/lib/dblink.so"
> 
> There were problems executing "/opt/dbs/pgsql84-beta2/bin/psql" --set
> ON_ERROR_STOP=on --port 5432 -f "/home/postgres/pg_migrator_dump_db.sql"
> --dbname template1 >> "/dev/null"

Yep, pg_migrator will exit on any restore error.  This really relates to
the problem of how we handle /contrib schema migration from one
release to the other.  Good thing you posted to hackers because that is
really the group that can address this.  pg_migrator is really just
restoring the schema that pg_dump is producing.

> pg_migrator exits leaving me with a corrupted 8.3 instance.

When you say "corrupted", I assume you mean you have remove the _old
suffixes to restart your 8.3 instance, right?  I hope that is the only
corruption issue --- please confirm.

> At the very least, a mention in the documentation of incompatible
> contrib module(s) would be nice.  Even better would be a sanity check
> added to prevent this.

OK, I am looking to the hackers group for recommentations on this.  I
wonder if I should recommend uninstalling /contrib modules before the
upgrade, but that is not possible for custom data types that have
columns already defined in the old cluster.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Brad Nicholson
Date:
Subject: pg_migrator issue with contrib
Next
From: Andrew Dunstan
Date:
Subject: Re: pg_migrator issue with contrib