Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 354162B286A for ; Mon, 25 Jun 2012 19:58:10 -0300 (ADT) Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SjIET-0003sT-Hv for pgsql-bugs@postgresql.org; Mon, 25 Jun 2012 22:58:09 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SjIEH-0000Fq-6J for pgsql-bugs@postgresql.org; Mon, 25 Jun 2012 22:57:57 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1SjIEG-0007Xu-PW for pgsql-bugs@postgresql.org; Mon, 25 Jun 2012 22:57:56 +0000 Date: Mon, 25 Jun 2012 22:57:56 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created To: pgsql-bugs@postgresql.org From: m.sakrejda@gmail.com X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/210 X-Sequence-Number: 33437 The following bug has been logged on the website: Bug reference: 6706 Logged by: Maciek Sakrejda Email address: m.sakrejda@gmail.com PostgreSQL version: Unsupported/Unknown Operating system: Ubuntu 12.04 LTS (3.2.0-25-generic x86_64) Description: = Using the 9.2beta2 of pg_upgrade and for the upgrade-to cluster. Ran into an issue upgrading a 9.1 cluster via pg_upgrade. I can reproduce it consistently: 1. Create a 9.1 cluster 2. Run "drop extension plpgsql" as superuser 3. Run "create extension plpgsql" as non-superuser 4. Perform normal upgrade via pg_upgrade The last step fails and I get the following error in pg_upgrade_restore.log: SELECT binary_upgrade.create_empty_extension('plpgsql', 'pg_catalog', false, '1.0', NULL, NULL, ARRAY[]::pg_catalog.text[]); psql:pg_upgrade_dump_db.sql:40: ERROR: duplicate key value violates unique constraint "pg_extension_name_index" DETAIL: Key (extname)=3D(plpgsql) already exists.