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 1slWLY-008LGe-M9 for pgsql-general@arkaria.postgresql.org; Tue, 03 Sep 2024 16:25:37 +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 1slWLX-00DoFi-PP for pgsql-general@arkaria.postgresql.org; Tue, 03 Sep 2024 16:25:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1slWLX-00DoCa-8g for pgsql-general@lists.postgresql.org; Tue, 03 Sep 2024 16:25:35 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1slWLT-000Tfn-V1 for pgsql-general@lists.postgresql.org; Tue, 03 Sep 2024 16:25:33 +0000 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-7cd830e0711so3467074a12.0 for ; Tue, 03 Sep 2024 09:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bitnine-net.20230601.gappssmtp.com; s=20230601; t=1725380730; x=1725985530; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hr1iQVYbFDmL7LRC9y/OUIvY4CZ8qPvavgk/srLpQo4=; b=Vyc4M8AO99UKXlL6cno07ModclhlvYRw8tHkvFJ/owpf7ecDXNZgOf95K6O2ZMFsJI D250aOoIeoKFpUtYEvfwk2W4/Go+lh8R3MUQ3qE2rFComqHvfmAaGskvQ1VH/fROdRQt JuEV/QecEC02yqtQULgojmNxGczbE56jfwzXsAj3NwKuHmXiPKfAJqvuwY1lEIsoTEG2 RoubDi6tPqERX4VfBpmMul+G9C3q3hNsx/sHmLxA/ElEwfXJWcjIKkDtsTJQz5mEDx0Y /+Y44hx47YpVpkUyexeCvf47Y0ezkkuW3EWBrv0hrzps56YxPQiElAweQtoA9eLjTvnj J2kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725380730; x=1725985530; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hr1iQVYbFDmL7LRC9y/OUIvY4CZ8qPvavgk/srLpQo4=; b=rosfp7LPo3Is2jeBoLAM/DpvGFw6PAcSRoAchYwKTeX0/24lImDG8U+s4jUWA/dqQ7 jmd0r+ewTVi9DR3TzsBQEdhdyzONd3bmzVqER29Vp6rJBQgC82Zdo+RsLElp3wbJiauB JTKxt8Jr3Z678kW3DY/HrUIeftQDyag+aiN1GYfT1Sx5g7cAMYmBuCwtTAeFfCFMNvhy ff+EiBcM4O9j0wd43hCZTT6OWg24fX00rpCZqqhgoYzVc4Mc+EvbbcbRwbgksCdGkbtm 0gV4NouvZrtR1Aum/L0V3Ih2OOviHEOdiiFYUovMv+PHbapc7Dt0UtJRqnrZOtuIcZlT KtEA== X-Gm-Message-State: AOJu0Yzvpi6793M2FOIc/pxFdjMI+pJpyzCxxDNzC4jY4G0z3lvaSVPr mGBTQpyfSiVAl2sTgQl1Q9eS170o/fS9GbA4EqHEOobtLweH+Xzn/9556eFI5NTkvTCteKpl1fK UFgN3JHMkDMw2SmijGR48ocmKMBVCE8X9nqd1Ww== X-Google-Smtp-Source: AGHT+IFHmKNP/XKgOje4f+CWt1QpLKEn9yl+j2mv41gHqAirW4SNnAzEvyxvtfUSkMdcxyOSknqHbjafq+QThG5BaCU= X-Received: by 2002:a17:90a:c917:b0:2d8:9d79:761a with SMTP id 98e67ed59e1d1-2d89d7977a7mr15823338a91.7.1725380730190; Tue, 03 Sep 2024 09:25:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Muhammad Usman Khan Date: Tue, 3 Sep 2024 21:25:17 +0500 Message-ID: Subject: Re: Issue with Restore dump with plpythonu, plpython3u installed on postgres16 To: Sam Son Cc: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000086956a0621398103" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000086956a0621398103 Content-Type: text/plain; charset="UTF-8" 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 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 > --00000000000086956a0621398103 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
You need to install p= lpython3u 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


On Tue, 3 Sept 2024 at 19:31, Sam Son <sam89.g@gmail.com> wrote:
Hi Team,
I am working on a project where we have applications=C2=A0run on old v= ersions of postgres, we are using=C2=A0plpythonu=C2=A0in all Functio= ns extension,=C2=A0

Now we have upgraded postgres to latest which do= es not support plpythonu anymore, So we are facing an issue while restoring= dump which has plpythonu, but latest postgres support only plpython3u.=C2= =A0

"pg_restore: error: could not execute q= uery: ERROR: =C2=A0language "plpythonu" does not exist"<= /div>

How to change plpythonu to plpython3u in the = dump file before pg_restore. or Does postgres have any option to handle dir= ectly via config.=C2=A0

Thanks in Advance

<= /div>
Thanks,
Samson G
--00000000000086956a0621398103--