pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_upgrade: error when migrating from 8.3 to 9.1
2+ messages / 2 participants
[nested] [flat]
* pg_upgrade: error when migrating from 8.3 to 9.1
@ 2012-01-15 11:54 sayeed <sayeed.anjum@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: sayeed @ 2012-01-15 11:54 UTC (permalink / raw)
To: pgsql-admin
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:
Adding support functions to new cluster ok
Restoring database schema to new cluster
"/usr/lib/postgresql/9.1/bin/psql" --set ON_ERROR_STOP=on --no-psqlrc --port
5435 --username "postgres" -f "/var/lib/postgresql/pg_upgrade_dump_db.sql"
--dbname template1 >> "/dev/null"
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"
The code at line 85146 is as follows:
CREATE FUNCTION pg_freespacemap_pages() RETURNS SETOF record
LANGUAGE c
AS '$libdir/pg_freespacemap', 'pg_freespacemap_pages';
Why does this happen? Any hints how this can be fixed? As a work around, is
it safe to create this function in 9.1 and how do I do that?
Help! Thanks in advance...
--
View this message in context: http://postgresql.1045698.n5.nabble.com/pg-upgrade-error-when-migrating-from-8-3-to-9-1-tp5146289p51...
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pg_upgrade: error when migrating from 8.3 to 9.1
@ 2012-01-15 17:28 Tom Lane <tgl@sss.pgh.pa.us>
parent: sayeed <sayeed.anjum@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2012-01-15 17:28 UTC (permalink / raw)
To: sayeed <sayeed.anjum@gmail.com>; +Cc: pgsql-admin
sayeed <sayeed.anjum@gmail.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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-01-15 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-01-15 11:54 pg_upgrade: error when migrating from 8.3 to 9.1 sayeed <sayeed.anjum@gmail.com>
2012-01-15 17:28 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox