Upgrading PostGIS using the postgis_manager.sh
script does not require you to remove PostGIS support and re-enable it.
Removing PostGIS support from a database drops PostGIS database objects from the database without warning. Users accessing PostGIS objects might interfere with the dropping of PostGIS objects. See the Notes section in .
A PostGIS 2.5.4 pivotal.3
package contains PostGIS 2.5.4. Also, the PostGIS 2.5.4 pivotal.3
package supports using the CREATE EXTENSION
command and the DROP EXTENSION
command to enable and remove PostGIS support in a database. See .
After upgrading the Greenplum PostGIS package, you can remove the PostGIS 2.1.5 package (gppkg
) from the Greenplum system. See Removing the PostGIS 2.1.5 package.
Install the PostGIS 2.5.4 package into the Greenplum Database system with the
gppkg
utility.Run the
gppkg -q --all
command to verify the updated package version is installed in the Greenplum Database system.-
$GPHOME/share/postgresql/contrib/postgis-2.5/postgis_manager.sh mytest upgrade
After running the script, you can verify that PostGIS 2.5.4 is installed and enabled as an extension in a database with this query.
# SELECT * FROM pg_available_extensions WHERE name = 'postgis' ;
You can validate that PostGIS 2.5 is enabled in the database with the
postgis_version()
function.
After you have completed the upgrade to PostGIS 2.5.4 pivotal.3
for the Greenplum system and all the databases with PostGIS enabled, you enable PostGIS in a new database with the command. To remove PostGIS support, use the DROP EXTENSION postgis CASCADE
command.
After upgrading the databases in the Greenplum Database system, you can remove the PostGIS 2.1.5 package from the system. This command removes the postgis-2.1.5+pivotal.2
package from a Greenplum Database system.
Run the gppkg -q --all
command to list the installed Greenplum packages.
You can upgrade the installed PostGIS 2.5.4 package from pivotal.1
or pivotal.2
to pivotal.3
(a minor release upgrade). The upgrade updates the PostGIS 2.5.4 package to the minor release (pivotal.3
) that uses the same PostGIS version (2.5.4).
The pivotal.3
minor release supports using the CREATE EXTENSION
command and the DROP EXTENSION
command to enable and remove PostGIS support in a database. See .
- Confirm you have a PostGIS 2.5.4 package
postgis-2.5.4+**pivotal.1**
orpostgis-2.5.4+**pivotal.2**
installed in a Greenplum Database system. See Checking the PostGIS Version. For all databases with PostGIS enabled, upgrade PostGIS with the PostGIS 2.5.4
postgis_manager.sh
script that is in the directory$GPHOME/share/postgresql/contrib/postgis-2.5
to upgrade PostGIS in that database. This command upgrades PostGIS that is enabled in the databasemytest
in the Greenplum Database system.$GPHOME/share/postgresql/contrib/postgis-2.5/postgis_manager.sh mytest upgrade
After you have completed the upgrade to PostGIS 2.5.4 pivotal.3
for the Greenplum system and all the databases with PostGIS enabled, you enable PostGIS in a new database with the CREATE EXTENSION postgis
command. To remove PostGIS support, use the DROP EXTENSION postgis CASCADE
command.
When upgrading PostGIS you must check the version of the Greenplum PostGIS package installed on the Greenplum Database system and the version of PostGIS enabled in the database.
Check the installed PostGIS package version with the
gppkg
utility. This command lists all installed Greenplum packages.Check the enabled PostGIS version in a database with the
postgis_version()
function. Thispsql
command displays the version PostGIS that is enabled for the databasetestdb
.psql -d testdb -c 'select postgis_version();'
If PostGIS is not enabled for the database, Greenplum returns a
function does not exist
error.