Re: Upgrade extension from 8.4 to 9.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexander Rüegg <alr(at)bdal(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Upgrade extension from 8.4 to 9.1
Date: 2011-09-21 15:20:17
Message-ID: 23370.1316618417@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?ISO-8859-15?Q?Alexander_R=FCegg?= <alr(at)bdal(dot)de> writes:
> I am migrating databases from 8.4 to 9.1 using traditional backup and
> restore. After restore to a clean database everything seems to be ok.
> The only thing is that there are no extensions for my prior installed
> modules. Do I really have to install extensions with "create extension
> XXXXX from unpackaged"?

The "upgrade from unpackaged" scripts are designed to migrate from the
9.0 versions of the contrib modules. If you try to use them on 8.4 or
older versions, it's not too surprising that there might be missing
functions and so on, meaning that this is not surprising:

> When I try to create the extension for "dblink" I get the following error:
> ERROR: function dblink_get_notify() does not exist SQL Status:42883

> Now I ended up with uninstalling the module with the uninstall-script in
> share/contrib and then creating the extension without "unpackaged".

That's what you're going to have to do. It's no worse than what you'd
be doing if you needed to update to a newer version of the contrib
module in the pre-extensions world. Take some comfort in the fact that
future upgrades will be smoother.

Now, if you have a large number of databases that you need to migrate,
you might consider building alternate upgrade scripts that can upgrade
directly from the 8.4 states of the contrib modules you're using. The
extension mechanism is definitely capable of managing that, but nobody
bothered to do the legwork to create such scripts.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Susan Cassidy 2011-09-21 15:25:05 Re: SQL function and input variables
Previous Message Raymond O'Donnell 2011-09-21 15:03:53 Re: Storing PHP 5.3 sessions into PostgreSQL 8.4