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 1slVH2-008DsD-EH for pgsql-general@arkaria.postgresql.org; Tue, 03 Sep 2024 15:16:53 +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 1slVH1-00D6bl-Ix for pgsql-general@arkaria.postgresql.org; Tue, 03 Sep 2024 15:16:51 +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 1slVH0-00D6bb-C2 for pgsql-general@lists.postgresql.org; Tue, 03 Sep 2024 15:16:51 +0000 Received: from fout6-smtp.messagingengine.com ([103.168.172.149] helo=pfout6-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 1slVGx-000Tmn-92 for pgsql-general@lists.postgresql.org; Tue, 03 Sep 2024 15:16:49 +0000 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 5B9BE13803D8; Tue, 3 Sep 2024 11:16:45 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Tue, 03 Sep 2024 11:16:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= 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=1725376605; x=1725463005; bh=aLPgEdgJ37Gyp4MiIxr8SQVBJlOPyx+LXSpTdf+0UiA=; b= w+oVh3PGHxtOjmxy0c8eOKE++oLj6LOiuaTgQe0F53psgAJMOXT+QYUEZiQqg1ms 22gUK+GpKtN8IHnEIoZCF910uSuXzV8fQecf79vPktsjEJgPKLf9eIe8rU9r8NXk UqwnJQWiSw3S89aw6cHJGBXqpokEMqtKMjNi/0QGq6VqeUkkxNgMueA53xJhS/xV pWxWVI3WjAU9qFe6ywQHmGtmPmXsjZsnjL8iQj4+FMNAN5vct3WMSCjDsdYz415/ Nzp6842rAJgXhwDMp0ZeP8eObHKHhCx5kMXnKFr013D22+vZdr0D+IIKJhfUTMy+ 09JLMN5Sr0V2VYp62tXUhA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1725376605; x= 1725463005; bh=aLPgEdgJ37Gyp4MiIxr8SQVBJlOPyx+LXSpTdf+0UiA=; b=I mZJSKU2PrEEMAKKKkPVTB30ko5LeHFTlUN8V7rFQ+4mlRwPzCYsvjPQql2vyqHnU aUekpQNQT9lFUGRP2YbEpfaqS9Jna7X886/TCVbVT7cpY/TjUgLca4VnTGEDC2pN HtKgTyYTNQ9QyEvSRJ8cvjVfnQJrFArEhGWQht6SrNxXBbH05hWEHTwmsD3mjAEd /dn8iVRrVEzsMZLoEm5dn8HNNfWbIDZTgg6kMrMXGApcxK+u50TCWkZ/AVzpdWi5 Biz7T/q73HLMbIXlmvkroY9jI9hKtop2QuotI9lZVooQSDWFIX563kXScQZrsJQ9 IFuTVyWXYV5CaQvPywp1g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudehhedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfg fuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghr uceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrth htvghrnhepffelgeeifefgveduhedthfekuedtffejveegffegjeevtdehgfduieetfeeh jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg gurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohep vddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgrmhekledrghesghhmrghilh drtghomhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhpohhs thhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 3 Sep 2024 11:16:44 -0400 (EDT) Message-ID: <23e8a33e-19af-4a33-b0fa-a225052c264d@aklaver.com> Date: Tue, 3 Sep 2024 08:16:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Issue with Restore dump with plpythonu, plpython3u installed on postgres16 To: Sam Son , 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/2/24 04:37, 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, What versions of Postgres? > > 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. The best way I found to do this is install plpython3u in the old versions and convert your plpythonu functions to use plpython3u. Then you can drop plpythonu and do the dump/restore. This will also make you deal with the fact that Python2 != Python3 and your functions may need Python related changes as well. > > *"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