<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:inherit;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New",serif;}
tt
        {mso-style-priority:99;
        font-family:"Courier New",serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1451316305;
        mso-list-type:hybrid;
        mso-list-template-ids:-50285782 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>That looks good as it’s not showing the scripts </span><tt><span style='font-size:10.0pt'>procs need upgrade <o:p></o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'>Message any more<o:p></o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'>Do you by chance have more than one database with PostGIS installed?  You’d need to run it on every database if you do.<o:p></o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'>That’s the only thing I can think of that might be causing the issue.<o:p></o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'>It is possible that the update didn’t happen in 2.5.2 and instead in 2.5.3, but I thought it was in 2.5.2.<o:p></o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'>That said – you could overwrite the views in your 11 cluster with the patched ones.<o:p></o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'>geometry_columns<o:p></o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></tt></p><p class=MsoNormal><a href="https://git.osgeo.org/gitea/postgis/postgis/src/tag/2.5.3/postgis/postgis.sql.in#L5608">https://git.osgeo.org/gitea/postgis/postgis/src/tag/2.5.3/postgis/postgis.sql.in#L5608</a> (make sure to prefix with the schema you have postgis installed in so doesn’t try to create a new view)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></tt></p><p class=MsoNormal><tt><span style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></tt></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Bo Guo<br><b>Sent:</b> Monday, December 23, 2019 10:54 AM<br><b>To:</b> postgis-users@lists.osgeo.org<br><b>Subject:</b> Re: [postgis-users] PostgreSQL 12 and PostGIS<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>Regina,  Since the new cluster was never created so I just upgraded the extension by running your select statement which returned: <o:p></o:p></p><p><span style='font-size:10.0pt;font-family:"Courier New",serif'>POSTGIS="2.5.2 r17328" [EXTENSION] PGSQL="110" GEOS="3.7.1-CAPI-1.11.1 27a5e771" 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</span><o:p></o:p></p><div><p class=MsoNormal>Not sure if the postgis gets updated though, as my problem persisted with the same error message.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Cheers,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Bo<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>On 12/22/19 11:03 PM, Regina Obe wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Okay this one is caused by a change in PostgreSQL 12 catalogs.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Fixed in PostGIS 2.5.2 I believe - </span><a href="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/2.5.2/NEWS">https://git.osgeo.org/gitea/postgis/postgis/raw/tag/2.5.2/NEWS</a>  (the pg_constraint change)<o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>So to upgrade, what you need to do is</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'>    </span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Reinit your new cluster (as I think at this point your new cluster is in an unstable state)</span><o:p></o:p></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'>    </span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> Restart up your old cluster and run the upgrade on it -  SELECT postgis_extensions_upgrade();  - that will bring it up to 2.5.2 and fix the views so they are compatible with 12.</span><o:p></o:p></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='mso-list:Ignore'>3)<span style='font:7.0pt "Times New Roman"'>    </span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Then do your migration again</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> postgis-users [<a href="mailto:postgis-users-bounces@lists.osgeo.org">mailto:postgis-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Bo Guo<br><b>Sent:</b> Monday, December 23, 2019 12:47 AM<br><b>To:</b> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br><b>Subject:</b> Re: [postgis-users] PostgreSQL 12 and PostGIS</span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><p>Hi, Regina,<o:p></o:p></p><p>After sucessful upgrade to the Dev server, I started upgrading the Test server which had the following version profile; <o:p></o:p></p><p><tt><span style='font-size:10.0pt'>select version();</span></tt><span style='font-size:10.0pt;font-family:"Courier New",serif'><br><tt>PostgreSQL 11.3 (Ubuntu 11.3-1.pgdg16.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609, 64-bit</tt></span><o:p></o:p></p><p>and <o:p></o:p></p><p style='margin-bottom:12.0pt'><tt><span style='font-size:10.0pt'>select postgis_full_version();</span></tt><span style='font-size:10.0pt;font-family:"Courier New",serif'><br><tt>POSTGIS="2.5.2 r17328" [EXTENSION] PGSQL="100" (procs need upgrade for use with "110") GEOS="3.7.1-CAPI-1.11.1 27a5e771" 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" (core procs from "2.5.1 r17027" need upgrade) TOPOLOGY (topology procs from "2.5.1 r17027" need upgrade) RASTER (raster procs from "2.5.1 r17027" need upgrade)</tt></span><o:p></o:p></p><pre><span style='font-size:13.5pt;font-family:"Times New Roman",serif'>However the pg_upgradecluster command failed for different reason as shown in the last few lines in the log file.  I thought Dev and Test servers had been identical in terms of OS and Postgres/PostGIS install.  Look like there was some difference...</span><o:p></o:p></pre><pre> <o:p></o:p></pre><pre><tt>pg_restore: creating VIEW "postgis.geography_columns"</tt><o:p></o:p></pre><pre><tt>pg_restore: creating VIEW "postgis.geometry_columns"</tt><o:p></o:p></pre><pre><tt>pg_restore: while PROCESSING TOC:</tt><o:p></o:p></pre><pre><tt>pg_restore: from TOC entry 496; 1259 54951 VIEW geometry_columns postgres</tt><o:p></o:p></pre><pre><tt>pg_restore: error: could not execute query: ERROR:  column s.consrc does not exist</tt><o:p></o:p></pre><pre><tt>LINE 28:             "replace"("split_part"("s"."consrc", ''''::"text...</tt><o:p></o:p></pre><pre><tt>                                            ^</tt><o:p></o:p></pre><pre><tt>HINT:  Perhaps you meant to reference the column "s.conkey" or the column "s.conbin".</tt><o:p></o:p></pre><pre><tt>Command was:</tt><o:p></o:p></pre><pre><tt>-- For binary upgrade, must preserve pg_type oid</tt><o:p></o:p></pre><pre><tt>SELECT pg_catalog.binary_upgrade_set_next_pg_type_oid('54953'::pg_catalog.oid);</tt><o:p></o:p></pre><pre><tt> </tt><o:p></o:p></pre><pre><tt> </tt><o:p></o:p></pre><pre><tt>-- For binary upgrade, must preserve pg_type array oid</tt><o:p></o:p></pre><pre><tt>SELECT pg_catalog.binary_upgrade_set_next_array_pg_type_oid('54952'::pg_catalog.oid);</tt><o:p></o:p></pre><pre><tt> </tt><o:p></o:p></pre><pre><tt> </tt><o:p></o:p></pre><pre><tt>-- For binary upgrade, must preserve pg_class oids</tt><o:p></o:p></pre><pre><tt>SELECT pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('54951'::pg_catalog.oid);</tt><o:p></o:p></pre><pre><tt> </tt><o:p></o:p></pre><pre><tt>CREATE VIEW "postgis"."geometry_columns" AS</tt><o:p></o:p></pre><pre><tt> SELECT ("current_database"())::character varying(256) AS "f_table_catalog",</tt><o:p></o:p></pre><pre><tt>    "n"."nspname" AS "f_table_schema",</tt><o:p></o:p></pre><pre><tt>    "c"."relname" AS "f_table_name",</tt><o:p></o:p></pre><pre><tt>    "a"."attname" AS "f_geometry_column",</tt><o:p></o:p></pre><pre><tt>    COALESCE("postgis"."postgis_typmod_dims"("a"."atttypmod"), "sn"."ndims", 2) AS "coord_dimension",</tt><o:p></o:p></pre><pre><tt>    COALESCE(NULLIF("postgis"."postgis_typmod_srid"("a"."atttypmod"), 0), "sr"."srid", 0) AS "srid",</tt><o:p></o:p></pre><pre><tt>    ("replace"("replace"(COALESCE(NULLIF("upper"("postgis"."postgis_typmod_type"("a"."atttypmod")), 'GEOMETRY'::"text"), "st"."$</tt><o:p></o:p></pre><pre><tt>   FROM (((((("pg_class" "c"</tt><o:p></o:p></pre><pre><tt>     JOIN "pg_attribute" "a" ON ((("a"."attrelid" = "c"."oid") AND (NOT "a"."attisdropped"))))</tt><o:p></o:p></pre><pre><tt>     JOIN "pg_namespace" "n" ON (("c"."relnamespace" = "n"."oid")))</tt><o:p></o:p></pre><pre><tt>     JOIN "pg_type" "t" ON (("a"."atttypid" = "t"."oid")))</tt><o:p></o:p></pre><pre><tt>     LEFT JOIN ( SELECT "s"."connamespace",</tt><o:p></o:p></pre><pre><tt>            "s"."conrelid",</tt><o:p></o:p></pre><pre><tt>            "s"."conkey",</tt><o:p></o:p></pre><pre><tt>            "replace"("split_part"("s"."consrc", ''''::"text", 2), ')'::"text", ''::"text") AS "type"</tt><o:p></o:p></pre><pre><tt>           FROM "pg_constraint" "s"</tt><o:p></o:p></pre><pre><tt>          WHERE ("s"."consrc" ~~* '%geometrytype(% = %'::"text")) "st" ON ((("st"."connamespace" = "n"."oid") AND ("st"."conrel$</tt><o:p></o:p></pre><pre><tt>     LEFT JOIN ( SELECT "s"."connamespace",</tt><o:p></o:p></pre><pre><tt>            "s"."conrelid",</tt><o:p></o:p></pre><pre><tt>            "s"."conkey",</tt><o:p></o:p></pre><pre><tt>            ("replace"("split_part"("s"."consrc", ' = '::"text", 2), ')'::"text", ''::"text"))::integer AS "ndims"</tt><o:p></o:p></pre><pre><tt>           FROM "pg_constraint" "s"</tt><o:p></o:p></pre><pre><tt>          WHERE ("s"."consrc" ~~* '%ndims(% = %'::"text")) "sn" ON ((("sn"."connamespace" = "n"."oid") AND ("sn"."conrelid" = "$</tt><o:p></o:p></pre><pre><tt>     LEFT JOIN ( SELECT "s"."connamespace",</tt><o:p></o:p></pre><pre><tt>            "s"."conrelid",</tt><o:p></o:p></pre><pre><tt>            "s"."conkey",</tt><o:p></o:p></pre><pre><tt>            ("replace"("replace"("split_part"("s"."consrc", ' = '::"text", 2), ')'::"text", ''::"text"), '('::"text", ''::"text$</tt><o:p></o:p></pre><pre><tt>           FROM "pg_constraint" "s"</tt><o:p></o:p></pre><pre><tt>          WHERE ("s"."consrc" ~~* '%srid(% = %'::"text")) "sr" ON ((("sr"."connamespace" = "n"."oid") AND ("sr"."conrelid" = "c$</tt><o:p></o:p></pre><pre><tt>  WHERE (("c"."relkind" = ANY (ARRAY['r'::"char", 'v'::"char", 'm'::"char", 'f'::"char", 'p'::"char"])) AND (NOT ("c"."relname"$</tt><o:p></o:p></pre><pre><tt> </tt><o:p></o:p></pre><pre><tt>-- For binary upgrade, handle extension membership the hard way</tt><o:p></o:p></pre><pre><tt>ALTER EXTENSION "postgis" ADD VIEW "postgis"."geometry_columns";</tt><o:p></o:p></pre><pre> <o:p></o:p></pre><pre> <o:p></o:p></pre><pre> <o:p></o:p></pre><div><p class=MsoNormal>On 12/22/19 9:11 PM, Bo Guo wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p>Yeh!  Thanks you, Regina!<o:p></o:p></p><div><p class=MsoNormal>On 12/22/19 8:54 PM, Regina Obe wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Okay I ran into that issue too.  </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>It happens if you have PostGIS not installed in public.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I have the issue ticketed here – I thought I had fixed this already in 3.0.1 (not yet released yet), but evidentally I haven’t or forgot to close this ticket.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><a href="https://trac.osgeo.org/postgis/ticket/4555">https://trac.osgeo.org/postgis/ticket/4555</a><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>The workaround is to do this:<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><div style='border:solid #D7D7D7 1.0pt;padding:3.0pt 3.0pt 3.0pt 3.0pt'><p class=MsoNormal style='mso-margin-top-alt:12.0pt;margin-right:21.0pt;margin-bottom:12.0pt;margin-left:21.0pt;background:#F7F7F7'><span style='font-size:10.0pt;font-family:"Courier New",serif'>CREATE EXTENSION postgis_raster FROM unpackaged VERSION "3.0.0" SCHEMA <schema where you installed postgis>;</span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> postgis-users [<a href="mailto:postgis-users-bounces@lists.osgeo.org">mailto:postgis-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Bo Guo<br><b>Sent:</b> Sunday, December 22, 2019 10:36 PM<br><b>To:</b> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br><b>Subject:</b> Re: [postgis-users] PostgreSQL 12 and PostGIS</span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><p>Thanks, Regina!  I am running PostgeSQL 12 now!<o:p></o:p></p><p>However, when I ran <b><span style='font-size:12.5pt;color:#993333;border:none windowtext 1.0pt;padding:0in'>SELECT</span></b><span style='font-size:12.5pt;font-family:"Courier New",serif'> PostGIS_Extensions_Upgrade</span><span style='font-size:12.5pt'>()</span><span style='font-size:12.5pt;font-family:"Courier New",serif'>; the second time, I have the following msg. </span><o:p></o:p></p><p><br><span style='font-size:12.5pt'>NOTICE: Extension postgis_sfcgal is not available or not packagable for some reason </span><o:p></o:p></p><p><span style='font-size:12.5pt'>NOTICE: Packaging extension postgis_raster</span><o:p></o:p></p><p><span style='font-size:12.5pt'>WARNING: 'postgis.gdal_datapath' is already set and cannot be changed until you reconnect </span><o:p></o:p></p><p><span style='font-size:12.5pt'>WARNING: 'postgis.gdal_enabled_drivers' is already set and cannot be changed until you reconnect </span><o:p></o:p></p><p><span style='font-size:12.5pt'>WARNING: 'postgis.enable_outdb_rasters' is already set and cannot be changed until you reconnect </span><o:p></o:p></p><p> <o:p></o:p></p><p><span style='font-size:12.5pt'>ERROR: function public.st_srid(geometry) does not exist </span><o:p></o:p></p><p><span style='font-size:12.5pt'>LINE 1: ..._makeemptyraster($1, $2, $3, $4, $5, -($5), 0, 0, public.ST_... ^ </span><o:p></o:p></p><p><span style='font-size:12.5pt'>HINT: No function matches the given name and argument types. You might need to add explicit type casts. </span><o:p></o:p></p><p><span style='font-size:12.5pt'>QUERY: SELECT public.ST_makeemptyraster($1, $2, $3, $4, $5, -($5), 0, 0, public.ST_SRID('POINT(0 0)'::geometry)) </span><o:p></o:p></p><p><span style='font-size:12.5pt'>CONTEXT: SQL statement "CREATE EXTENSION postgis_raster FROM unpackaged" </span><o:p></o:p></p><p><span style='font-size:12.5pt'>PL/pgSQL function postgis_extensions_upgrade() line 48 at EXECUTE </span><o:p></o:p></p><p><span style='font-size:12.5pt'>SQL state: 42883</span><o:p></o:p></p><p> <o:p></o:p></p><div><p class=MsoNormal>On 12/22/19 8:09 PM, Regina Obe wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>NO NO  don’t do that.  Those set of libraries aren’t compatible with each other.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>The PostGIS 3.0 and 2.5 from 12 are compatible with each other however.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>So </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>What you want to do is</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>cp /usr/lib/postgresql/12/lib/postgis-3.so /usr/lib/postgresql/12/lib/postgis-2.5.so</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>cp /usr/lib/postgresql/12/lib/postgis_raster-3.so /usr/lib/postgresql/12/lib/rtpostgis-2.5.so</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>cp /usr/lib/postgresql/12/lib/postgis_topology-3.so /usr/lib/postgresql/12/lib/postgis_topology-2.5.so</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Then after the upgrade in each of your databases run:</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='background:#F2F2F2;vertical-align:baseline'><b><span style='font-size:12.5pt;font-family:inherit;color:#993333;border:none windowtext 1.0pt;padding:0in'>SELECT</span></b><span style='font-size:12.5pt;font-family:"Courier New",serif'> PostGIS_Extensions_Upgrade</span><span style='font-size:12.5pt'>()</span><span style='font-size:12.5pt;font-family:"Courier New",serif'>;</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>And then run it again to rebundle the raster into it’s own extension</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='background:#F2F2F2;vertical-align:baseline'><b><span style='font-size:12.5pt;font-family:inherit;color:#993333;border:none windowtext 1.0pt;padding:0in'>SELECT</span></b><span style='font-size:12.5pt;font-family:"Courier New",serif'> PostGIS_Extensions_Upgrade</span><span style='font-size:12.5pt'>()</span><span style='font-size:12.5pt;font-family:"Courier New",serif'>;</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Then if you don’t need raster, you can </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>DROP EXTENSION postgis_raster;</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Once you are done upgrading your databases, you can delete thr *-2.5.so files you created in the 12 cluster.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> postgis-users [<a href="mailto:postgis-users-bounces@lists.osgeo.org">mailto:postgis-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Bo Guo<br><b>Sent:</b> Sunday, December 22, 2019 10:01 PM<br><b>To:</b> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br><b>Subject:</b> Re: [postgis-users] PostgreSQL 12 and PostGIS</span><o:p></o:p></p></div></div><p class=MsoNormal> <o:p></o:p></p><p>Thanks, Regina,<o:p></o:p></p><p>I copied the three 2.5 lib files from<span style='font-family:"Courier New",serif'> </span><span style='font-size:10.0pt;font-family:"Courier New",serif'>/usr/lib/postgresql/11/lib</span> to <span style='font-size:10.0pt;font-family:"Courier New",serif'>/usr/lib/postgresql/12/lib</span>:<o:p></o:p></p><p style='margin-bottom:12.0pt'><span style='font-size:10.0pt;font-family:"Courier New",serif'>guob@yuma:/usr/lib/postgresql/12/lib$ ls -al *post*<br>-rw-r--r-- 1 root root  456832 Dec 22 19:49 postgis-2.5.so<br>-rw-r--r-- 1 root root 1351536 Oct 28 21:24 postgis-3.so<br>-rw-r--r-- 1 root root  847424 Oct 28 21:24 postgis_raster-3.so<br>-rw-r--r-- 1 root root  364224 Dec 22 19:49 postgis_topology-2.5.so<br>-rw-r--r-- 1 root root  569152 Oct 28 21:24 postgis_topology-3.so<br>-rw-r--r-- 1 root root  100264 Nov 12 03:33 postgres_fdw.so<br>-rw-r--r-- 1 root root  399136 Dec 22 19:50 rtpostgis-2.5.so</span><o:p></o:p></p><p>However, the three lib files are still in the <span style='font-size:10.0pt;font-family:"Courier New",serif'>loadable_libraries.txt</span> file.<o:p></o:p></p><p>Bo<o:p></o:p></p><div><p class=MsoNormal>On 12/22/19 7:42 PM, Regina Obe wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Bo,<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Do you have the postgis-2.5.so, rtpostgis-2.5.so, postgis_topology-2.5.so<o:p></o:p></pre><pre>files in<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>/usr/lib/postgresql/11/lib<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>And<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>/usr/lib/postgresql/12/lib<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Those are the files it's complaining about. <o:p></o:p></pre><pre> <o:p></o:p></pre><pre> <o:p></o:p></pre><pre> <o:p></o:p></pre><pre> <o:p></o:p></pre><pre>From: postgis-users [<a href="mailto:postgis-users-bounces@lists.osgeo.org">mailto:postgis-users-bounces@lists.osgeo.org</a>] On Behalf<o:p></o:p></pre><pre>Of Bo Guo<o:p></o:p></pre><pre>Sent: Sunday, December 22, 2019 9:16 PM<o:p></o:p></pre><pre>To: <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><o:p></o:p></pre><pre>Subject: Re: [postgis-users] PostgreSQL 12 and PostGIS<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Regina and Stefan,<o:p></o:p></pre><pre>I might have run into a similar issues today as I was  trying to upgrade<o:p></o:p></pre><pre>PostgreSQL 11 w/ PostGIS 2.5 to PostgreSQL 12 w/ PostGIS 3.0.<o:p></o:p></pre><pre>The pg_upgradecluster command (sudo pg_upgradecluster -m upgrade 11 main)<o:p></o:p></pre><pre>failed its check for the following required libraries:<o:p></o:p></pre><pre>    could not load library "$libdir/postgis-2.5": ERROR:  could not access<o:p></o:p></pre><pre>file "$libdir/postgis-2.5": No such file or directory<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>    could not load library "$libdir/rtpostgis-2.5": ERROR:  could not access<o:p></o:p></pre><pre>file "$libdir/rtpostgis-2.5": No such file or directory<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>    could not load library "$libdir/postgis_topology-2.5": ERROR:  could not<o:p></o:p></pre><pre>access file "$libdir/postgis_topology-2.5": No such file or directory<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>I have postgis-2.5 in the /usr/share/postgresql/11/contrib/ folder AND<o:p></o:p></pre><pre>/usr/share/postgresql/12/contrib/ folder.  I also have postgis-3.0 under<o:p></o:p></pre><pre>/usr/share/postgresql/12/contrib/.  <o:p></o:p></pre><pre>Thanks for your help!<o:p></o:p></pre><pre>Bo<o:p></o:p></pre><pre>Gistic Research, Inc.<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>On 10/4/19 8:16 AM, Regina Obe wrote:<o:p></o:p></pre><pre>Stefan,<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Which distro do you get your PostgreSQL 12 from.  I’m assuming<o:p></o:p></pre><pre>apt.postgresql.org<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>If so you should report on their mailing list, as that would be a packaging<o:p></o:p></pre><pre>bug,not a PostGIS one and no one on the PostGIS project is on the apt team.<o:p></o:p></pre><pre><a href="https://www.postgresql.org/list/pgsql-pkg-debian/">https://www.postgresql.org/list/pgsql-pkg-debian/</a><o:p></o:p></pre><pre> <o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Thanks,<o:p></o:p></pre><pre>Regina<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>From: postgis-users [<a href="mailto:postgis-users-bounces@lists.osgeo.org">mailto:postgis-users-bounces@lists.osgeo.org</a>] On Behalf<o:p></o:p></pre><pre>Of Stefan Wolf<o:p></o:p></pre><pre>Sent: Friday, October 4, 2019 6:19 AM<o:p></o:p></pre><pre>To: <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><o:p></o:p></pre><pre>Subject: [postgis-users] PostgreSQL 12 and PostGIS<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Today I’ve installed the brand new PostgreSQL 12  on Ubuntu 18.04<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>“apt-get install postgis”  will install PostGIS 2.5.2, but the  PATH is<o:p></o:p></pre><pre>wrong:  /usr/share/postgresql/11/…<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>So CREATE EXTENSION postgis will fail.<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Greetings from Berlin<o:p></o:p></pre><pre>-Stefan Wolf-<o:p></o:p></pre><pre> <o:p></o:p></pre><pre> <o:p></o:p></pre><pre> <o:p></o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>postgis-users mailing list<o:p></o:p></pre><pre><a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><o:p></o:p></pre><pre> <o:p></o:p></pre><pre> <o:p></o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>postgis-users mailing list<o:p></o:p></pre><pre><a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><o:p></o:p></pre></blockquote><pre>-- <o:p></o:p></pre><pre>Regards,<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Bo Guo, PhD, PE<o:p></o:p></pre><pre>President<o:p></o:p></pre><pre>Gistic Research, Inc.<o:p></o:p></pre><pre>2033 E Warner Rd Ste 105<o:p></o:p></pre><pre>Tempe, AZ 85284<o:p></o:p></pre><pre><a href="http://www.gisticinc.com">www.gisticinc.com</a><o:p></o:p></pre><pre><a href="http://www.youtube.com/linearbench">www.youtube.com/linearbench</a><o:p></o:p></pre><pre>Office: 480-656-9962<o:p></o:p></pre><pre>Cell: 602-570-4697<o:p></o:p></pre><p class=MsoNormal><br><br><br><br><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>postgis-users mailing list<o:p></o:p></pre><pre><a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><o:p></o:p></pre></blockquote><pre>-- <o:p></o:p></pre><pre>Regards,<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Bo Guo, PhD, PE<o:p></o:p></pre><pre>President<o:p></o:p></pre><pre>Gistic Research, Inc.<o:p></o:p></pre><pre>2033 E Warner Rd Ste 105<o:p></o:p></pre><pre>Tempe, AZ 85284<o:p></o:p></pre><pre><a href="http://www.gisticinc.com">www.gisticinc.com</a><o:p></o:p></pre><pre><a href="http://www.youtube.com/linearbench">www.youtube.com/linearbench</a><o:p></o:p></pre><pre>Office: 480-656-9962<o:p></o:p></pre><pre>Cell: 602-570-4697<o:p></o:p></pre><p class=MsoNormal><br><br><br><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>postgis-users mailing list<o:p></o:p></pre><pre><a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><o:p></o:p></pre></blockquote><pre>-- <o:p></o:p></pre><pre>Regards,<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Bo Guo, PhD, PE<o:p></o:p></pre><pre>President<o:p></o:p></pre><pre>Gistic Research, Inc.<o:p></o:p></pre><pre>2033 E Warner Rd Ste 105<o:p></o:p></pre><pre>Tempe, AZ 85284<o:p></o:p></pre><pre><a href="http://www.gisticinc.com">www.gisticinc.com</a><o:p></o:p></pre><pre><a href="http://www.youtube.com/linearbench">www.youtube.com/linearbench</a><o:p></o:p></pre><pre>Office: 480-656-9962<o:p></o:p></pre><pre>Cell: 602-570-4697<o:p></o:p></pre></blockquote><pre>-- <o:p></o:p></pre><pre>Regards,<o:p></o:p></pre><pre> <o:p></o:p></pre><pre>Bo Guo, PhD, PE<o:p></o:p></pre><pre>President<o:p></o:p></pre><pre>Gistic Research, Inc.<o:p></o:p></pre><pre>2033 E Warner Rd Ste 105<o:p></o:p></pre><pre>Tempe, AZ 85284<o:p></o:p></pre><pre><a href="http://www.gisticinc.com">www.gisticinc.com</a><o:p></o:p></pre><pre><a href="http://www.youtube.com/linearbench">www.youtube.com/linearbench</a><o:p></o:p></pre><pre>Office: 480-656-9962<o:p></o:p></pre><pre>Cell: 602-570-4697<o:p></o:p></pre><p class=MsoNormal><br><br><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>postgis-users mailing list<o:p></o:p></pre><pre><a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><o:p></o:p></pre><pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><o:p></o:p></pre></blockquote><pre><o:p> </o:p></pre></div></body></html>