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 1uWcvy-00GbbD-3f for pgsql-admin@arkaria.postgresql.org; Tue, 01 Jul 2025 15:30:10 +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 1uWcvw-006T22-8H for pgsql-admin@arkaria.postgresql.org; Tue, 01 Jul 2025 15:30:08 +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 1uWcvv-006T1o-TR for pgsql-admin@lists.postgresql.org; Tue, 01 Jul 2025 15:30:08 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uWcvu-0057Nn-1F for pgsql-admin@lists.postgresql.org; Tue, 01 Jul 2025 15:30:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 561FU2ZX3165867; Tue, 1 Jul 2025 11:30:03 -0400 From: Tom Lane To: Laurenz Albe cc: Nikhil Shetty , Pgsql-admin Subject: Re: pg_upgrade failure due to dependencies In-reply-to: <396f2fb636248f329c152c6eca189f4348fec726.camel@cybertec.at> References: <396f2fb636248f329c152c6eca189f4348fec726.camel@cybertec.at> Comments: In-reply-to Laurenz Albe message dated "Tue, 01 Jul 2025 11:37:06 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3165865.1751383802.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Jul 2025 11:30:02 -0400 Message-ID: <3165866.1751383802@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Laurenz Albe writes: > On Tue, 2025-07-01 at 11:23 +0530, Nikhil Shetty wrote: >> I was trying an upgrade from=C2=A0PostgreSQL 13 and PostGIS 3.1.2 TO Po= stgreSQL 15 and PostGIS 3.4.2 and got below error >> pg_restore: error: could not execute query: ERROR: relation "public.sp= atial_ref_sys" does not exist >> LINE 1: ...LECT proj4text, auth_name, auth_srid, srtext FROM public.spa= ... >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0^ >> QUERY: SELECT proj4text, auth_name, auth_srid, srtext FROM public.spat= ial_ref_sys WHERE srid =3D 3857 LIMIT 1 > The PostGIS people must be misinformed. > The fault is clearly theirs for marking the function st_transform(geomet= ry, text, integer) as IMMUTABLE: That's clearly pretty risky, but I don't understand the context here. pg_dump always restores extensions first. Surely both this function and the spatial_ref_sys table would be created by the PostGIS extension(s)? regards, tom lane