<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi all,<br>
    <br>
    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.  <br>
    <br>
    Steps:<br>
    <br>
    1. Install the Postgis binaries for Postgresql 11 on the server OS:<br>
    <br>
        <tt>sudo apt install postgresql-11-postgis-2.5
      postgresql-11-postgis-scripts</tt><br>
    <br>
    2. Shutdown the postgresql services<br>
    <br>
    3. Drop the Postgresql 11 cluster:<br>
    <br>
        <tt>sudo pg_dropcluster 11 main</tt><br>
    <br>
    4. Run the cluster upgrade command  <br>
    <br>
        <tt>sudo pg_upgradecluster -m upgrade 10 main</tt><br>
    <br>
    5. Extension upgrade<br>
    <br>
        <tt>alter extension postgis update;</tt><br>
    <br>
        I got "version "2.5.1" of extension "postgis" is already
    installed"<br>
    <br>
    6. Check postgis version:<br>
    <br>
        <tt>select postgis_full_version();</tt><br>
    <p>    And I got:</p>
    <blockquote>
      <p><tt>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</tt><br>
      </p>
    </blockquote>
    Question & Comment<br>
    <br>
    1. Step 6 resulted in  <tt>procs need upgrade for use with "110"</tt> 
    What am I supposed to do with this?<br>
    <br>
    2. It appears that the cluster upgrade updates the extensions as
    long as the right versions of extension binaries are installed.<br>
    <br>
    Thanks!<br>
    <br>
    Bo<br>
    <p><br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 1/25/19 9:48 AM, Paul Ramsey wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:744535C6-5E40-4439-BEC1-5934CD5FAD44@cleverelephant.ca">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      Just run 
      <div class=""><br class="">
      </div>
      <div class="">  SELECT postgis_full_version()</div>
      <div class=""><br class="">
      </div>
      <div class="">You should see the right version and libraries
        referenced.</div>
      <div class=""><br class="">
      </div>
      <div class="">P<br class="">
        <div><br class="">
          <blockquote type="cite" class="">
            <div class="">On Jan 25, 2019, at 8:46 AM, Bo Guo <<a
                href="mailto:bo.guo@gisticinc.com" class=""
                moz-do-not-send="true">bo.guo@gisticinc.com</a>>
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <meta http-equiv="Content-Type" content="text/html;
                charset=UTF-8" class="">
              <div text="#000000" bgcolor="#FFFFFF" class="">
                <p class="">OK.  Is there a way to validate the success
                  of a Postgis upgrade?<br class="">
                </p>
                <div class="moz-cite-prefix">On 1/25/19 9:33 AM, Paul
                  Ramsey wrote:<br class="">
                </div>
                <blockquote type="cite"
                  cite="mid:C9E7727A-CDCC-48A5-9199-940BE42546BE@cleverelephant.ca"
                  class="">
                  <pre class="moz-quote-pre" wrap="">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




</pre>
                  <blockquote type="cite" class="">
                    <pre class="moz-quote-pre" wrap="">On Jan 25, 2019, at 8:26 AM, Bo Guo <a class="moz-txt-link-rfc2396E" href="mailto:bo.guo@gisticinc.com" moz-do-not-send="true"><bo.guo@gisticinc.com></a> 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
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org" moz-do-not-send="true">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/postgis-users" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/postgis-users</a>
</pre>
                  </blockquote>
                  <pre class="moz-quote-pre" wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org" moz-do-not-send="true">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/postgis-users" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></pre>
                </blockquote>
              </div>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>