[postgis-users] Postgis upgrade with Postgresql 9.6 to 11 upgrade

Bo Guo bo.guo at gisticinc.com
Sat Jan 26 15:42:12 PST 2019


Hi all,

Today, I tried a Postgresql 10 to Postgresql 11 on our test server 
(Ubuntu 16.04) where both Postgresql 10 and 11 clusters are running.

Steps:

1. Install the Postgis binaries for Postgresql 11 on the server OS:

sudo apt install postgresql-11-postgis-2.5 postgresql-11-postgis-scripts

2. Shutdown the postgresql services

3. Drop the Postgresql 11 cluster:

sudo pg_dropcluster 11 main

4. Run the cluster upgrade command

sudo pg_upgradecluster -m upgrade 10 main

5. Extension upgrade

alter extension postgis update;

     I got "version "2.5.1" of extension "postgis" is already installed"

6. Check postgis version:

select postgis_full_version();

     And I got:

    POSTGIS="2.5.1 r17027" [EXTENSION] PGSQL="100" (procs need upgrade
    for use with "110") GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.9.2,
    08 September 2015" GDAL="GDAL 1.11.3, released 2015/09/16"
    LIBXML="2.9.3" LIBJSON="0.11.99" LIBPROTOBUF="1.2.1" TOPOLOGY RASTER

Question & Comment

1. Step 6 resulted in procs need upgrade for use with "110" What am I 
supposed to do with this?

2. It appears that the cluster upgrade updates the extensions as long as 
the right versions of extension binaries are installed.

Thanks!

Bo



On 1/25/19 9:48 AM, Paul Ramsey wrote:
> Just run
>
>   SELECT postgis_full_version()
>
> You should see the right version and libraries referenced.
>
> P
>
>> On Jan 25, 2019, at 8:46 AM, Bo Guo <bo.guo at gisticinc.com 
>> <mailto:bo.guo at gisticinc.com>> wrote:
>>
>> OK.  Is there a way to validate the success of a Postgis upgrade?
>>
>> On 1/25/19 9:33 AM, Paul Ramsey wrote:
>>> You have two options, or maybe less, depending on where you get your PostgreSQL and PostGIS from. If you get them from some packager or other you might not have the freedom to mix-and-match versions.
>>>
>>> OPTION: Simple And Lots of Steps
>>>
>>> - Install Pg11 and PostGIS 2.4.4 for Pg11.
>>> - Run your PgSQL pg_upgrade process
>>> - Install PostGIS 2.5 for Pg11
>>> - Run the PostGIS ‘ALTER EXTENSION postgis UPDATE’ process
>>> - Celegrate
>>>
>>> OPTION: More harder
>>>
>>> - Install Pg11 and PostGIS 2.5 for Pg11
>>> - Try and run your pg_upgrade
>>> - If you’re lucky, it “just works”
>>> - If you’re not lucky, you might have to find the Pg11 install of postgis-2.5.so and make a symlink to it from postgis-2.4.so
>>> - If you’re not lucky, you might have to track down and remove old versions of geos that are interfering with newer versions
>>>
>>> Note that in both options, you do have to install a version of PostGIS that has been built against your new database version. The PostGIS 2.4 you already have installed for Pg9.6 is only serving your 9.6 databases, it does nothing for your new Pg11 databases.
>>>
>>> ATB,
>>> P
>>>
>>>
>>>
>>>
>>>> On Jan 25, 2019, at 8:26 AM, Bo Guo<bo.guo at gisticinc.com>  wrote:
>>>>
>>>> Hi all,
>>>>
>>>> We plan to upgrade PostgreSQL 9.6 (PostGIS "2.4.4 r16526") to PostgreSQL 11 in the next couple of weeks.
>>>>
>>>> I am just wondering if there is anything I should be concerned about on the side of Postgis, such as will postgis version upgrade automatically?  If not, should I upgrade Postgis after the PostgreSQL update?, etc.
>>>>
>>>> Thanks!
>>>>
>>>> Bo
>>>>
>>>>
>>>> _______________________________________________
>>>> postgis-users mailing list
>>>> postgis-users at lists.osgeo.org
>>>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/postgis-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190126/0592b72e/attachment.html>


More information about the postgis-users mailing list