<div dir="ltr"><div>Hi all, <br></div><div><br></div><div>wondering about the upgrade process I'm using, whether there's a better way, and a possible minor bug. <br></div><div><br></div><div>I have a server running postgres 12 databases that currently use psotgis 3.0.0 and i'm looking to update postgis. <br></div><div><br></div><div>I have used the following commands to do so:</div><br><div>>>sudo apt update<br>>>sudo apt -y upgrade<br>>>sudo reboot<br>>>sudo apt -y install gnupg2<br>>>wget --quiet -O - <a href="https://www.postgresql.org/media/keys/ACCC4CF8.asc">https://www.postgresql.org/media/keys/ACCC4CF8.asc</a> | sudo apt-key add -<br>>>echo "deb <a href="http://apt.postgresql.org/pub/repos/apt/">http://apt.postgresql.org/pub/repos/apt/</a> `lsb_release -cs`-pgdg main" |sudo tee  /etc/apt/sources.list.d/pgdg.list<br>>>sudo apt update<br>>>sudo apt install postgis postgresql-12-postgis-3</div><div><br></div><div>once I've run these, I still need to run the following query in each database to complete the upgrade</div><div><br>ALTER EXTENSION postgis UPDATE;</div><div><br></div><div>Before I run this query, the results of <br></div><div><br></div><div>SELECT PostGIS_Version(); are 3.2.2, the upgraded version,</div><div><br></div><div>The results of SELECT PostGIS_Full_Version(); is an error</div><div>ERROR: A stored procedure tried to use deprecated C function 'postgis_svn_version'</div><div><br></div><div>The results of SELECT * FROM pg_extension; are postgis 3.0.0. <br></div><div><br></div><div>Testing functions like st_hexagongrid(), which is available in 3.2 and not in 3.0 returns an error, indicating the database is still using 3.0. <br></div><div><br></div><div>once I run the postgis UPDATE query, all of this is resolved and the results are 3.2 for all checks. <br></div><div><br></div><div>My questions are, <br></div><div><br></div><div>is there a way to automatically upgrade all databases on the server? I suppose I could put together a shell script but wondering if there is a standard way for doing this. <br></div><div><br></div><div>and, is it possible that the difference in version results between postgis_version() and pg_extention prior to updating should be considered a bug? Looking at packages installed on the server, it looks like my update commands replaced 3.0 with 3.2 instead of installing it side by side. <br></div><div><br></div><div>Is working on a database that hasn't been updated to 3.2 on a server that has been updated likely to cause any problems if I expect it to work according to the 3.0 codebase as it has historically?<br></div><div><br></div><div>Thanks for any thoughts or suggestions!</div><div><br></div><div>Hugh <br></div><div><br></div>     <br><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><br></div></div></div></div></div></div></div></div></div></div>