Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfcwS-0006f5-Mj for pgsql-general@arkaria.postgresql.org; Thu, 19 Nov 2020 05:57:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kfcwR-0001zn-Bk for pgsql-general@arkaria.postgresql.org; Thu, 19 Nov 2020 05:57:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfcwR-0001zg-1Z for pgsql-general@lists.postgresql.org; Thu, 19 Nov 2020 05:57:11 +0000 Received: from mail-il1-x144.google.com ([2607:f8b0:4864:20::144]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kfcwJ-0005iz-ME for pgsql-general@lists.postgresql.org; Thu, 19 Nov 2020 05:57:10 +0000 Received: by mail-il1-x144.google.com with SMTP id z14so2509035ilm.10 for ; Wed, 18 Nov 2020 21:57:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=2j0qgJ66F6xHmBHPwFgoRiYEGBU22cAmi8suAmayypE=; b=L/+ffVoj3T86nkzPbuuvPjhSZC6qK238HLj1SBSIEzdzvsuxlITaMcdyFKIa3mVtCW tG7Ii1tSx3OubEJpiak6gQJjmr8+xtjNM/zOcmTGUjcy6RR0A0W1xBwEqcgwCY4r9H3B 8qi0AXp0mL5/ELXrLnKmkVkG79N4Vvoi63/dowGgR0xyhu0GJa3UtlmIN5dLZ1c6kZo1 U5QaoCJSP/iqXDHfTzgb1+7Yn2emhdCC45lSQyLthU4rdlvYoj9iwRutrTAGZhkuCMps SWi8HiY1BMs14Hkr71vmkNVB48/8s9Ivfi43IW0wHb0gMYu2C0vAAmZ/zk/Pz5lH7d2K JJSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=2j0qgJ66F6xHmBHPwFgoRiYEGBU22cAmi8suAmayypE=; b=aTKfc8MUWsVJsrF6JrKZ28uwqtfht0VQo0BFmGs2abPBOAyZJzVpZAmgGsd7I42yQ1 vxnErZkgGaQ10lYE2c+Y+rn5jJUPHa7Q58kNuwvCdYv3gprEMFfVKg0grjP47x4ZRxC2 wscfGhRDJbtUe0AmLH+7n0OfHVIOeWoa14TzMhgjzNjAiP7XHL3UJ54tj5jBO6P4F0FI 10nqrm15HWjDtIcojMBWr7Ta6CFj7nmr8dAEAVKZhu9NVRa40ohc0q8bKJx9MgYx7+Rc BMFspKiM+71+uT2CGI5wuDrf3irq4ung+UC+MpD+G0ULXMI3XleSrIZCDI52OgOvCCoS 3ekw== X-Gm-Message-State: AOAM5335yb24wDC66xIMk8qe3AZM0fpqalgeeQfyEA0tHJnbhOu+Fd3H 8mAiADoPkvR9aTON3RX5a1M= X-Google-Smtp-Source: ABdhPJyA6Q/6X1+Yvgvkb4H4lOxEHA2V37H70jWAFoBxf5b5khgz+nTQSuslVbmcFAP72nv+dDpSpQ== X-Received: by 2002:a92:cf4b:: with SMTP id c11mr20410623ilr.46.1605765421691; Wed, 18 Nov 2020 21:57:01 -0800 (PST) Received: from ?IPv6:2601:681:5500:dde0:4c79:1ac5:1fe9:a461? ([2601:681:5500:dde0:4c79:1ac5:1fe9:a461]) by smtp.gmail.com with ESMTPSA id 10sm13568281iou.50.2020.11.18.21.57.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Nov 2020 21:57:01 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Rob Sargent Mime-Version: 1.0 (1.0) Subject: Re: pg_upgrade from 12 to 13 failes with plpython2 Date: Wed, 18 Nov 2020 22:57:00 -0700 Message-Id: <97B34E7D-9A94-413E-8A04-D9C3683EE2AC@gmail.com> References: <20201119043943.GB6414@momjian.us> Cc: =?utf-8?Q?Devrim_G=C3=BCnd=C3=BCz?= , Tom Lane , Marcin Giedz , Laurenz Albe , Magnus Hagander , Adrian Klaver , pgsql-general In-Reply-To: <20201119043943.GB6414@momjian.us> To: Bruce Momjian X-Mailer: iPhone Mail (18A8395) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Nov 18, 2020, at 9:39 PM, Bruce Momjian wrote: >=20 > =EF=BB=BFOn Wed, Nov 18, 2020 at 09:35:20PM -0700, Rob Sargent wrote: >>> pg_upgrade does have some code to handle plpython call handlers in >>> function.c:get_loadable_libraries(); >>>=20 >>> * Systems that install plpython before 8.1 have >>> * plpython_call_handler() defined in the "public" schema, causing= >>> * pg_dump to dump it. However that function still references >>> * "plpython" (no "2"), so it throws an error on restore. This co= de >>> * checks for the problem function, reports affected databases to t= he >>> * user and explains how to remove them. 8.1 git commit: >>> * e0dedd0559f005d60c69c9772163e69c204bac69 >>> * http://archives.postgresql.org/pgsql-hackers/2012-03/msg01101.p= hp >>> * http://archives.postgresql.org/pgsql-bugs/2012-05/msg00206.php >>>=20 >>> --=20 >>> Bruce Momjian https://momjian.us >>> EnterpriseDB https://enterprisedb.com >>>=20 >>> The usefulness of a cup is in its emptiness, Bruce Lee >>>=20 >>>=20 >> Unless it stop at prompts for =E2=80=9CYes, ok, I understand.=E2=80=9D th= is could easily fly out the window. >=20 > It issues this message and fails: >=20 > if (PQntuples(res) > 0) > { > if (!found_public_plpython_handler) > { > pg_log(PG_WARNING, > "\nThe old cluster has a \"plpython_call_handler= \" function defined\n" > "in the \"public\" schema which is a duplicate o= f the one defined\n" > "in the \"pg_catalog\" schema. You can confirm t= his by executing\n" > "in psql:\n" > "\n" > " \\df *.plpython_call_handler\n" > "\n" > "The \"public\" schema version of this function w= as created by a\n" > "pre-8.1 install of plpython, and must be remove= d for pg_upgrade\n" > "to complete because it references a now-obsolet= e \"plpython\"\n" > "shared object file. You can remove the \"publi= c\" schema version\n" > "of this function by running the following comma= nd:\n" > "\n" > " DROP FUNCTION public.plpython_call_handler(= )\n" > "\n" > "in each affected database:\n" > "\n"); > } > pg_log(PG_WARNING, " %s\n", active_db->db_name); > found_public_plpython_handler =3D true; > } > PQclear(res); > } >=20 > PQfinish(conn); > } >=20 > if (found_public_plpython_handler) > pg_fatal("Remove the problem functions from the old cluster to cont= inue.\n"); >=20 >=20 Does this jive with OP=E2=80=99s experience? Or should it?=