Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1slWWo-008MW2-2s for pgsql-general@arkaria.postgresql.org; Tue, 03 Sep 2024 16:37:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1slWWn-00E2zc-7T for pgsql-general@arkaria.postgresql.org; Tue, 03 Sep 2024 16:37:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1slWWl-00E2yn-QH for pgsql-general@lists.postgresql.org; Tue, 03 Sep 2024 16:37:13 +0000 Received: from fhigh3-smtp.messagingengine.com ([103.168.172.154] helo=pfhigh3-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1slWWg-000UMQ-Cm for pgsql-general@lists.postgresql.org; Tue, 03 Sep 2024 16:37:10 +0000 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id BC97B114043A; Tue, 3 Sep 2024 12:37:03 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Tue, 03 Sep 2024 12:37:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1725381423; x=1725467823; bh=7syjyIveH+ZL5sGrTUjlC6ffuJpgOReurwhshIrdnGU=; b= jNFvhEOn7XRQQqe6OzLg8S1xJVWOE6F+zUQZokTymf2j67mCvoP8jJI+0rzNJkni Egu8GqdryTmmPNhSAEPIsTUyqKU84h9qWLk2n8jRY5y0Q3CyvCQ2h4VMnRUpGbPA klYsvVsGQBhjgjWKzzLT2wUI0VQVAtWxsY09K6ioXdOO+8TSHs/TaL5IX9CVCWQw X44i/4NUb41nU4PwjwHFzIwsC71WBbiXTr9KW/z3ya84UI1UcBxyD/UMG3M49/Q3 4Biv/qB9H8ZPJFcNAc4kLeBUS/mDQkh+ZQwjVMF2ATi3B09018NyzQ6brN0hlK3A SOWn1e4Bd5Gsg1QQFBUz2w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1725381423; x= 1725467823; bh=7syjyIveH+ZL5sGrTUjlC6ffuJpgOReurwhshIrdnGU=; b=a dSbOL6OUCRdckvdHeDD9g0eBoXh3dBaQASQn48Jj3vsKEwpN4pYWVICSKGd6ivbv 8pe/qjlIBtpyQSD0EamwQ4y0waKU8db+Oi4+a9wCylrC/DM4m6f+9g7Z20hMSBXa 49tm3BrQ1Qx4xMhAvSGIyM0mpugefZqap3vQwFBJ4eI61EsIaTRosrtRlI/pFmaA qVK8JYUkYVA9KCnmKSaDvb0OQ5rDQILHj0GuUqWFGvEbWpIsTcfthfNuiYzeMA2A Tq/m+8Mq4aq4hig0/eVttLfIDRVV/nFT06WUocCuyTmglp3mUyWl6cI3xRu3RbTn VrVzf/LKLg8UEVQ/5uzIg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudehhedguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddv jeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpefgudefkefhveefleev ieeuveehvdduudekuddvvdelhfeuueeijedtuedvvedvueenucffohhmrghinhepphhosh htghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnh gspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuhhsmhgr nhdrkhessghithhnihhnvgdrnhgvthdprhgtphhtthhopehsrghmkeelrdhgsehgmhgrih hlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphho shhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 3 Sep 2024 12:37:02 -0400 (EDT) Message-ID: Date: Tue, 3 Sep 2024 09:37:02 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Issue with Restore dump with plpythonu, plpython3u installed on postgres16 To: Muhammad Usman Khan , Sam Son Cc: pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/3/24 09:25, Muhammad Usman Khan wrote: > Hi, > You need to install plpython3u on your new server and also make sure to > use python3. You need to make changes to your functions also to make > them compatible with python3 That only works if the dump from the old server is outputting plpython3u. If the plpythonu is the only version installed on the old server then that is what will be in the dump file. As of Postgres 15 plpythonu is no longer available: https://www.postgresql.org/docs/15/plpython-python23.html This means if you are moving to 15+ you can't have any references to plpythonu. > > > On Tue, 3 Sept 2024 at 19:31, Sam Son > wrote: > > Hi Team, > > I am working on a project where we have applications run on old > versions of postgres, we are using *plpythonu* in all Functions > extension, > > Now we have upgraded postgres to latest which does not support > plpythonu anymore, So we are facing an issue while restoring dump > which has plpythonu, but latest postgres support only plpython3u. > > *"pg_restore: error: could not execute query: ERROR:  language > "plpythonu" does not exist"* > > How to change plpythonu to plpython3u in the dump file before > pg_restore. or Does postgres have any option to handle directly via > config. > > Thanks in Advance > > Thanks, > Samson G > -- Adrian Klaver adrian.klaver@aklaver.com