Coming from PostGIS < 3.1, you need to remove it prior to upgrade and reinstall it after you upgrade. If you see SFCGAL in your output, it means you have postgis_sfcgal extension installed. (1 row) Remove postgis_sfcgal extension prior to upgrade RASTER (raster procs from "2.4.9" need upgrade) (sfcgal procs from "2.4.9" need upgrade) TOPOLOGY (topology procs from "2.4.9" need upgrade) LIBPROTOBUF="1.0.2" (core procs from "2.4.9" need upgrade) Your output should look something like below (the fact it shows need upgrade is a bug in 2.4, you can ignore) SELECT version(), postgis_full_version() In the psql console - repeat for each postgisy extension you have I'm doing with psql right on the server su postgres For this example, I'm going to connect to my gisdb database which has PostGIS already installed. Sudo yum upgrade Confirm your PostgreSQL and PostGIS versionsīefore you begin your upgrade journey, log into your old cluster and confirm what you are running. It's always good to be up to date on your patches before attempting a PostgreSQL major upgrade. Just install the latest version of pgAdmin which at time of this writing is 6.14. If you use pgAdmin, you'll definitely want to be above 6.10 if you plan to upgrade to PostgreSQL 15. So if you are < PostgreSQL 11, test your apps heavily with newer PostgreSQL before attempting a PostgreSQL 12 or higher upgrade. NET, PHP, and possibly even rewrite some code. From PostgreSQL 12 on, you may need to upgrade your database drivers such as JDBC. I've found that for most applications you can safely upgrade PostgreSQL 9.6 to 11. A lot has changed in catalogs from PostgreSQL 11 - 15. I have a database on PostgreSQL 9.6 with a postgis 2.4 installed in it called gisdb.įor those with dependent apps. The steps are CentOS/RHEL specific, but the general principals of what you need to do are the same regardless of if you are on Windows, FreeBSD/Unix, Linux, or some other OS.įor the rest of this, I'll assume you've already got PostgreSQL 9.6 installed with PostGIS 2.4, and you want to upgrade it to PostgreSQL 11 or higher on the same server. In An almost idiot's guide to install PostgreSQL 9.3, PostGIS 2.1 and pgRouting with Yum If per chance you are on PostGIS 1 and trying to jump all the way to PostGIS 3+, then sadly you need to do a pg_dump of your old database/cluster and pg_restore into your new cluster.įirst if you are on PostGIS < 2.4, refer to the article Using pg_upgrade to upgrade PostgreSQL 9.3 PostGIS 2.4 to PostgreSQL 11 (Drop functions that won't migrate)įor this exercise, I'm going to do it on a CentOS 7 Box, I created and installed PostGIS 2.4 on following instructions similar to what I detailed Additionally once you are on PostGIS 3.1+, you should never have to do symlink or copy hacks to upgrade say PostGIS 3.1 to PostGIS 3.4. Going from PostGIS 2+ to PostGIS 3+ can still be done without installing the old PostGIS 2+ in your new cluster. This is a revisit of that article, but with considerations for upgrading from a 2 series to a 3 series.įear not. In a previous article Using pg upgrade to upgrade PostGIS without installing older version I demonstrated a trick for upgrading to a newer PostgreSQL instance from PostGIS 2.2 - 2.whatever without having to install the older version of PostGIS in your new PostgreSQL service. To celebrate the arrival of PostgreSQL 15, I will revisit the number one problem people have with PostGIS, how to upgrade your PostGIS enabled cluster, without installing an old PostGIS version.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |