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

From Bruce Momjian
Subject Re: pg_migrator issue with contrib
Date
Msg-id 200906070313.n573DAn14321@momjian.us
Whole thread Raw
In response to Re: pg_migrator issue with contrib  (Josh Berkus <josh@agliodbs.com>)
Responses Re: pg_migrator issue with contrib  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Josh Berkus wrote:
> On 6/5/09 6:27 PM, Bruce Momjian wrote:
> > Josh Berkus wrote:
> >> Bruce,
> >>
> >> Assuming a contrib module *hasn't* changed its API, does pg_migrator
> >> link against the 8.4 version of the module's .so, or the old 8.3 version?
> >
> > 8.4 version, or whatever is in the 8.4 lib, which should be 8.4.
> 
> So, here's what we need for 8.3 --> 8.4 for contrib modules:
> 
> 1) make a list of contrib modules which do not convert cleanly (testers?)
> 2) document these.
> 3) give pg_migrator some hackish way to install 8.4 contrib modules from 
> source before copying over the database.
> 4) set pg_migrator to ignore duplicate object warnings if it does the above.
> 
> Note that we expect NOT to have this issue for 8.4-->8.5, since we'll 
> have a full module infrastructure by then.  Really!

I think the cleanest solution is to document that these issues might
happen and suggest solutions.  This has already worked for our tester
today so I am hopeful people will just figure out how to fix this.

I have added dblink as a specific migration example to the INSTALL file:

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

If an error occurs while restoring the database schema, pg_migrator will
exit and you will have to revert to the old cluster as outlined in step
#10 below.  To try pg_migrator again, you will need to modify the old
cluster so the pg_migrator schema restore succeeds.  If the problem is a
/contrib module, you might need to uninstall the /contrib module from
the old cluster and install it in the new cluster after the migration,
assuming the module is not being used to store user data.

For example, /contrib/dblink changed its API from Postgres 8.3 to 8.4 so
sites using it must uninstall dblink from their Postgres 8.3, cluster,
do the migration, then install dblink in Postgres 8.4.  More complex
cases might require individual objects to be migrated manually.

--  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: Bruce Momjian
Date:
Subject: Re: pg_migrator issue with contrib
Next
From: Tom Lane
Date:
Subject: Re: pg_migrator issue with contrib