<div dir="ltr"><div><br></div><div>Hi hackers!</div><div><br></div><div>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<br></div><div><br></div><div>The error we get is:<br></div><div><pre><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<br><br></pre><pre>The reason is, that after this commit <a href="https://github.com/postgres/postgres/commit/f52d2fbd8c62f667191b61228acf9d8aa53607b9">https://github.com/postgres/postgres/commit/f52d2fbd8c62f667191b61228acf9d8aa53607b9</a><br></pre><pre>extension are not allowed to replace objects not belonging to the extension.<br></pre><pre>After debuging with gdb, we have find out than postgis_tiger_geocoder do this sql command while <br>upgrade:<br><br>ALTER EXTENSION postgis_tiger_geocoder DROP FUNCTION setsearchpathforinstall(character varying);<br></pre><pre>which erase dependency between postgis_tiger_geocoder ext and setsearchpathforinstall function, reasoning in upgrade failure.<br></pre><pre>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.<br></pre></div></div>