From 9c5c96ae4912c8702b5a4cd2f6affde9fe63bf0d Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Fri, 2 Mar 2012 13:15:31 +0000 Subject: [PATCH] Add section about soft upgrade with extensions. git-svn-id: http://svn.osgeo.org/postgis/trunk@9381 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/installation.xml | 45 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/doc/installation.xml b/doc/installation.xml index 75c17398c..8117ca222 100644 --- a/doc/installation.xml +++ b/doc/installation.xml @@ -8,7 +8,8 @@ Short Version - The raster support is currently optional, but in final release it will be required. + The raster support is currently optional, but installed by default. For installing using the PostgreSQL 9.1+ extensions model it is required. + Please refer to if you are using PostgreSQL 9.1+. All the .sql files once installed will be installed in share/contrib/postgis-&last_release_version; folder of your PostgreSQL install The postgis_comments.sql, raster_comments.sql, topology_comments.sql @@ -544,8 +545,9 @@ tar -xvzf postgis-&last_release_version;.tar.gz If you are building from souce repository, you need to build the function descriptions first with: make comments - Building the comments is not necessary if you are building from a tar ball since these are packaged pre-built with the tar ball already. - Next build the extensions and install them. + Building the comments is not necessary if you are building from a release tar ball since these are packaged pre-built with the tar ball already. + If you are building against PostgreSQL 9.1, the extensions should automatically build as part of the make install process. You can if needed build from the extensions + folders or copy files if you need them on a differnt server. cd extensions cd postgis make clean @@ -580,12 +582,20 @@ make install Once you do that, you should see postgis, postgis_topology as available extensions in PgAdmin -> extensions. If you are using psql, you can verify that the extensions are installed by running this query: - SELECT name + SELECT name, default_version,installed_version FROM pg_available_extensions WHERE name LIKE 'postgis%' ; - name ------------------- - postgis - postgis_topology + name | default_version | installed_version +-----------------+-----------------+------------------- +postgis | &last_release_version; | &last_release_version; +postgis_topology | &last_release_version; | + +If you have the extension installed in the you are querying, you'll see mention in the installed_version column. +If you get no records back, it means you don't have postgis extensions installed on the server at all. PgAdmin III 1.4+ will also provide this information +in the extensions section of the database browser tree and will even allow upgrade by right-clicking. + +If you have the extensions available, you can install postgis extension in your database of choice by either using pgAdmin extension interface or running these sql commands: +CREATE EXTENSION postgis; +CREATE EXTENSION postgis_topology; @@ -1072,6 +1082,12 @@ pretty_address Soft upgrade + If you installed your database using extensions, you'll need to upgrade using the extension model as well. If you installed using the old sql script way, + then you should upgrade using the sql script way. Please refer to the appropriate. + + Soft Upgrade Pre 9.1+ or without extensions + This section applies only to those who installed PostGIS not using extensions. If you have extensions and try to upgrade with this approach you'll get messages like: + can't drop ... because postgis extension depends on it After compiling you should find several postgis_upgrade*.sql files. Install the one for your version of PostGIS. For example postgis_upgrade_13_to_15.sql should be used if you are upgrading @@ -1103,6 +1119,19 @@ pretty_address should inform you about the need to run this kind of upgrade using a "procs need upgrade" message. + + + Soft Upgrade 9.1+ using extensions + If you originally installed PostGIS with extensions, then you need to upgrade using extensions as well. Doing a minor upgrade with extensions, is fairly painless. + ALTER EXTENSION postgis UPDATE TO "&last_release_version;"; +ALTER EXTENSION postgis_topology UPDATE TO "&last_release_version;"; + If you get an error notice something like: + No migration path defined for ... to &last_release_version; + Then you'll need to backup your database, create a fresh one as defined in and then restore your backup ontop of this new database. + You might get a message that postgis extension already installed which you can safely ignore. + If you installed PostGIS originally without a version specified, you can often skip the reinstallation of postgis extension before restoring since the backup just has CREATE EXTENSION postgis and thus + picks up the newest latest version during restore. . + -- 2.50.1