[postgis-devel] Postgis upgrade issues with new PostgreSQL minor versions

Kirill Reshke reshke at double.cloud
Thu Aug 18 02:40:27 PDT 2022


Hi hackers!

We have faced an issue while upgrading postgis extension on one of our
cluster. We upgrade from 2.5.2 version to 3.0.0 to be precise. PG version
in 11.17

The error we get is:

<cut>/db1 M # alter extension postgis_tiger_geocoder update TO "3.0.0";
ERROR:  55000: function setsearchpathforinstall(character varying) is
not a member of extension "postgis_tiger_geocoder"
DETAIL:  An extension is not allowed to replace an object that it does not own.
LOCATION:  recordDependencyOnCurrentExtension, pg_depend.c:187
Time: 80.574 ms

The reason is, that after this commit
https://github.com/postgres/postgres/commit/f52d2fbd8c62f667191b61228acf9d8aa53607b9

extension are not allowed to replace objects not belonging to the extension.

After debuging with gdb, we have find out than postgis_tiger_geocoder
do this sql command while
upgrade:

ALTER EXTENSION postgis_tiger_geocoder DROP FUNCTION
setsearchpathforinstall(character varying);

which erase dependency between postgis_tiger_geocoder ext and
setsearchpathforinstall function, reasoning in upgrade failure.

So, is this a well-known bug? how we can get rid of this? i will try
to propose a patch for it, if this is unknown bug or there is no fix.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20220818/e03e44c7/attachment.htm>


More information about the postgis-devel mailing list