Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id E41D81FE6211 for ; Sun, 15 Jan 2012 13:28:37 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RmTsh-0006RF-Sa for pgsql-admin@postgresql.org; Sun, 15 Jan 2012 17:28:37 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q0FHSLbj017932; Sun, 15 Jan 2012 12:28:22 -0500 (EST) To: sayeed cc: pgsql-admin@postgresql.org Subject: Re: pg_upgrade: error when migrating from 8.3 to 9.1 In-reply-to: <1326628486711-5146289.post@n5.nabble.com> References: <1326628486711-5146289.post@n5.nabble.com> Comments: In-reply-to sayeed message dated "Sun, 15 Jan 2012 03:54:46 -0800" Date: Sun, 15 Jan 2012 12:28:21 -0500 Message-ID: <17931.1326648501@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/54 X-Sequence-Number: 38966 sayeed 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