[postgis-users] Library function 'pgis_geometry_union_finalfn' was deprecated in PostGIS 3.3.0

Sandro Santilli strk at kbt.io
Tue Oct 4 03:30:07 PDT 2022


Sandro Santilli wrote (please quote with appropriate attribution):

> > This means that your current "default" PostGIS version is 2.4.9,
> > so "postgis_extensions_upgrade()" tries to upgrade to that version,
> > but it's actually a DOWNGRADE instead.

On Mon, Oct 03, 2022 at 11:05:53AM +0200, Giuseppe Naponiello wrote:
>
> very strange:
> 
> # apt policy postgis
> postgis:
>   Installed: 3.3.1+dfsg-1.pgdg110+1
>   Candidate: 3.3.1+dfsg-1.pgdg110+1
> I'm using a debian stable from some years, I have always used "apt" to
> upgrade my packages so I never worried about version compatibility etc...

What does this SQL statement return ?

  SELECT default_version
  FROM pg_catalog.pg_available_extensions
  WHERE name = 'postgis';

What does this shell command return ?

  grep default_version `pg_config --sharedir`/extension/postgis.control

> > My suggestion is to (re)install PostGIS 3.3.1 to ensure it's listed
> > as the default version and run `postgis_extensions_upgrade()`.
>
> Ok, I like it, but could there be some problem during re-installation?

Life is full of problems, so sure there could be some.
I would not expect any though, in this case, if as you say you always
used debian stable over the years and always used "apt" to install
your packages. The code above will help you find out if this is really
the case.

> I have 10 db running and I would like to avoid disasters or users panic !!
> What is the correct procedure?

Safest procedure is database backups.
Knowing the state of your 10 databases would also be useful.
We have a nice "postgis" script but I dubt debian is packaging it; the
script would allow you to do something like:

    psql -XtAc 'select datname from pg_database' | xargs postgis status

Failing to have that script (ask for it to your distribution!) you can
obtain something similar with this:

  psql -XtAc 'select datname from pg_database' | while read DB; do
    echo "[$DB]";
    psql -XtAc 'select postgis_full_version()' $DB;
  done

--strk;

  Libre GIS consultant/developer
  https://strk.kbt.io/services.html


More information about the postgis-users mailing list