Skip site navigation (1) Skip section navigation (2)

Re: pg_upgrade: error when migrating from 8.3 to 9.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: sayeed <sayeed(dot)anjum(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_upgrade: error when migrating from 8.3 to 9.1
Date: 2012-01-15 17:28:21
Message-ID: 17931.1326648501@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
sayeed <sayeed(dot)anjum(at)gmail(dot)com> writes:
> I am trying to upgrade a database from postgresql 8.3.8 to 9.1. (Ubuntu 10.10
> Maverick) 
> It is crashing out with the following error:
> psql:/var/lib/postgresql/pg_upgrade_dump_db.sql:85146: ERROR:  could not
> find function "pg_freespacemap_pages" in file
> "/usr/lib/postgresql/9.1/lib/pg_freespacemap.so"

> Why does this happen?

Because pg_freespacemap_pages() doesn't exist (and neither does the
freespace map) in versions after 8.3.  Had pg_upgrade existed at the
time we removed the FSM, we might have taken a bit more care with what
would happen in an upgrade situation ... but it didn't.

You could do this via pg_dump and reload, in which case the missing
functions would result in ignorable errors during the reload.
If you want to do it via pg_upgrade, I think the most practical way
is to drop the whole pg_freespacemap extension (ie, run its uninstall
script) in your 8.3 installation, then do the upgrade, then install
9.1's version of the extension if you still want it.

			regards, tom lane

In response to

pgsql-admin by date

Next:From: Alexander FortinDate: 2012-01-16 09:25:37
Subject: Interpreting pg_stat_replication values
Previous:From: sayeedDate: 2012-01-15 11:54:46
Subject: pg_upgrade: error when migrating from 8.3 to 9.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group