<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>You are right, Regina. I had installed postgis in the postgres
database in addition to own database. - Bo<br>
</p>
<div class="moz-cite-prefix">On 12/24/19 10:26 AM, Regina Obe wrote:<br>
</div>
<blockquote type="cite"
cite="mid:002401d5ba7f$56496080$02dc2180$@pcorp.us">
<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: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;}
@font-face
{font-family:"Courier New \,serif";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* 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;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle26
{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]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Yah
if you had 2.5.3, you definitely didn’t need to bother with
the create view part.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">I
still think you’ve got PostGIS installed in postgres
database.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Try
doing this:<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">\connect
postgres<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">DROP
EXTENSION postgis;<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">See
if it drops – I bet it does. Then run your upgrade again.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><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
[<a class="moz-txt-link-freetext" 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 5:50 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><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, the saga goes on, but we are getting closer...<o:p></o:p></p>
<p>First of all, I removed a stray "topology" schema from the
"postgres" database. With that, I am certain that there is no
other postgis installs on the Test Server.<o:p></o:p></p>
<p>Then I ran the postgis extention upgrade in the targeted
database (LB) and saw the current version is 2.5.3.<o:p></o:p></p>
<p>Then I recreated the geometry_columns view by modifying the
source you provided with the postgis schema prefix "postgis"
so the view is not created in the "public" schema.<o:p></o:p></p>
<p>Finally, I ran <tt><span style="font-size:10.0pt">sudo
pg_upgradecluster -m upgrade 11 main</span></tt> with the
following console msg<o:p></o:p></p>
<p style="margin-bottom:12.0pt"><tt><span
style="font-size:10.0pt">Stopping old cluster...</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New",serif"><br>
<tt>Creating new PostgreSQL cluster 12/main ...</tt><br>
<tt>/usr/lib/postgresql/12/bin/initdb -D
/var/lib/postgresql/12/main --auth-local peer --auth-host
md5 --encoding UTF8 --lc-collate en_US.UTF-8 --lc-ctype
en_US.UTF-8</tt><br>
<tt>The files belonging to this database system will be
owned by user "postgres".</tt><br>
<tt>This user must also own the server process.</tt><br>
<br>
<tt>The database cluster will be initialized with locale
"en_US.UTF-8".</tt><br>
<tt>The default text search configuration will be set to
"english".</tt><br>
<br>
<tt>Data page checksums are disabled.</tt><br>
<br>
<tt>fixing permissions on existing directory
/var/lib/postgresql/12/main ... ok</tt><br>
<tt>creating subdirectories ... ok</tt><br>
<tt>selecting dynamic shared memory implementation ... posix</tt><br>
<tt>selecting default max_connections ... 100</tt><br>
<tt>selecting default shared_buffers ... 128MB</tt><br>
<tt>selecting default time zone ... America/Phoenix</tt><br>
<tt>creating configuration files ... ok</tt><br>
<tt>running bootstrap script ... ok</tt><br>
<tt>performing post-bootstrap initialization ... ok</tt><br>
<tt>syncing data to disk ... ok</tt><br>
<br>
<tt>Success. You can now start the database server using:</tt><br>
<br>
<tt> pg_ctlcluster 12 main start</tt><br>
<br>
<tt>Ver Cluster Port Status Owner Data
directory Log file</tt><br>
<tt>12 main 5433 down postgres
/var/lib/postgresql/12/main
/var/log/postgresql/postgresql-12-main.log</tt><br>
<br>
<tt>/usr/lib/postgresql/12/bin/pg_upgrade -b
/usr/lib/postgresql/11/bin -B /usr/lib/postgresql/12/bin
-p 5432 -P 5433 -d /etc/postgresql/11/main -D
/etc/postgresql/12/main</tt><br>
<tt>Finding the real data directory for the source
cluster ok</tt><br>
<tt>Finding the real data directory for the target
cluster ok</tt><br>
<tt>Performing Consistency Checks</tt><br>
<tt>-----------------------------</tt><br>
<tt>Checking cluster
versions ok</tt><br>
<tt>Checking database user is the install
user ok</tt><br>
<tt>Checking database connection
settings ok</tt><br>
<tt>Checking for prepared
transactions ok</tt><br>
<tt>Checking for reg* data types in user
tables ok</tt><br>
<tt>Checking for contrib/isn with bigint-passing
mismatch ok</tt><br>
<tt>Checking for tables WITH
OIDS ok</tt><br>
<tt>Checking for invalid "sql_identifier" user
columns ok</tt><br>
<tt>Creating dump of global
objects ok</tt><br>
<tt>Creating dump of database schemas</tt><br>
<tt>
ok</tt><br>
<tt>Checking for presence of required
libraries ok</tt><br>
<tt>Checking database user is the install
user ok</tt><br>
<tt>Checking for prepared
transactions ok</tt><br>
<br>
<tt>If pg_upgrade fails after this point, you must re-initdb
the</tt><br>
<tt>new cluster before continuing.</tt><br>
<br>
<tt>Performing Upgrade</tt><br>
<tt>------------------</tt><br>
<tt>Analyzing all rows in the new
cluster ok</tt><br>
<tt>Freezing all rows in the new
cluster ok</tt><br>
<tt>Deleting files from new
pg_xact ok</tt><br>
<tt>Copying old pg_xact to new
server ok</tt><br>
<tt>Setting next transaction ID and epoch for new
cluster ok</tt><br>
<tt>Deleting files from new
pg_multixact/offsets ok</tt><br>
<tt>Copying old pg_multixact/offsets to new
server ok</tt><br>
<tt>Deleting files from new
pg_multixact/members ok</tt><br>
<tt>Copying old pg_multixact/members to new
server ok</tt><br>
<tt>Setting next multixact ID and offset for new
cluster ok</tt><br>
<tt>Resetting WAL
archives ok</tt><br>
<tt>Setting frozenxid and minmxid counters in new
cluster ok</tt><br>
<tt>Restoring global objects in the new
cluster ok</tt><br>
<tt>Restoring database schemas in the new cluster</tt><br>
<tt>
postgres
</tt><br>
<tt>*failure*</tt><br>
<br>
<tt>Consult the last few lines of
"pg_upgrade_dump_19530.log" for</tt><br>
<tt>the probable cause of the failure.</tt><br>
<tt>Failure, exiting</tt><br>
<tt>Error: pg_upgrade run failed. Logfiles are in
/var/log/postgresql/pg_upgradecluster-11-12-main.kFdl</tt><br>
<tt>Error during cluster dumping, removing new cluster</tt><br>
<tt>Cluster is not running.</tt><br>
<tt>Error: could not stop old cluster, please do that
manually</tt></span><o:p></o:p></p>
<p>The last few line of the dump log is different from the dump
log I reported yesterday in the schema name - "public." vs
"postgis." I am baffled why today why the installer wanted to
install the view in "public"<o:p></o:p></p>
<p style="margin-bottom:12.0pt"><tt><span
style="font-size:10.0pt">pg_restore: creating VIEW
"public.geography_columns"</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New",serif"><br>
<tt>pg_restore: creating VIEW "public.geometry_columns"</tt><br>
<tt>pg_restore: while PROCESSING TOC:</tt><br>
<tt>pg_restore: from TOC entry 204; 1259 64516 VIEW
geometry_columns postgres</tt><br>
<tt>pg_restore: error: could not execute query: ERROR:
column s.consrc does not exist</tt><br>
<tt>LINE 28:
"replace"("split_part"("s"."consrc", ''''::"text...</tt><br>
<tt> ^</tt><br>
<tt>HINT: Perhaps you meant to reference the column
"s.conkey" or the column "s.conbin".</tt><br>
<tt>Command was:</tt><br>
<tt>-- For binary upgrade, must preserve pg_type oid</tt><br>
<tt>SELECT
pg_catalog.binary_upgrade_set_next_pg_type_oid('64518'::pg_catalog.oid);</tt><br>
<br>
<br>
<tt>-- For binary upgrade, must preserve pg_type array oid</tt><br>
<tt>SELECT
pg_catalog.binary_upgrade_set_next_array_pg_type_oid('64517'::pg_catalog.oid);</tt><br>
<br>
<br>
<tt>-- For binary upgrade, must preserve pg_class oids</tt><br>
<tt>SELECT
pg_catalog.binary_upgrade_set_next_heap_pg_class_oid('64516'::pg_catalog.oid);</tt><br>
<br>
<tt>CREATE VIEW "public"."geometry_columns" AS</tt><br>
<tt> SELECT ("current_database"())::character varying(256)
AS "f_table_catalog",</tt><br>
<tt> "n"."nspname" AS "f_table_schema",</tt><br>
<tt> "c"."relname" AS "f_table_name",</tt><br>
<tt> "a"."attname" AS "f_geometry_column",</tt><br>
<tt>
COALESCE("public"."postgis_typmod_dims"("a"."atttypmod"),
"sn"."ndims", 2) AS "coord_dimension",</tt><br>
<tt>
COALESCE(NULLIF("public"."postgis_typmod_srid"("a"."atttypmod"),
0), "sr"."srid", 0) AS "srid",</tt><br>
<tt>
("replace"("replace"(COALESCE(NULLIF("upper"("public"."postgis_typmod_type"("a"."atttypmod")),
'GEOMETRY'::"text"), "st"."t$</tt><br>
<tt> FROM (((((("pg_class" "c"</tt><br>
<tt> JOIN "pg_attribute" "a" ON ((("a"."attrelid" =
"c"."oid") AND (NOT "a"."attisdropped"))))</tt><br>
<tt> JOIN "pg_namespace" "n" ON (("c"."relnamespace" =
"n"."oid")))</tt><br>
<tt> JOIN "pg_type" "t" ON (("a"."atttypid" =
"t"."oid")))</tt><br>
<tt> LEFT JOIN ( SELECT "s"."connamespace",</tt><br>
<tt> "s"."conrelid",</tt><br>
<tt> "s"."conkey",</tt><br>
<tt> ("replace"("split_part"("s"."consrc", ' =
'::"text", 2), ')'::"text", ''::"text"))::integer AS
"ndims"</tt><br>
<tt> FROM "pg_constraint" "s"</tt><br>
<tt> WHERE ("s"."consrc" ~~* '%ndims(% =
%'::"text")) "sn" ON ((("sn"."connamespace" = "n"."oid")
AND ("sn"."conrelid" = "$</tt><br>
<tt> LEFT JOIN ( SELECT "s"."connamespace",</tt><br>
<tt> "s"."conrelid",</tt><br>
<tt> "s"."conkey",</tt><br>
<tt>
("replace"("replace"("split_part"("s"."consrc", ' =
'::"text", 2), ')'::"text", ''::"text"), '('::"text",
''::"text$</tt><br>
<tt> FROM "pg_constraint" "s"</tt><br>
<tt> WHERE ("s"."consrc" ~~* '%srid(% =
%'::"text")) "sr" ON ((("sr"."connamespace" = "n"."oid")
AND ("sr"."conrelid" = "c$</tt><br>
<tt> WHERE (("c"."relkind" = ANY (ARRAY['r'::"char",
'v'::"char", 'm'::"char", 'f'::"char", 'p'::"char"])) AND
(NOT ("c"."relname"$</tt><br>
<br>
<tt>-- For binary upgrade, handle extension membership the
hard way</tt><br>
<tt>ALTER EXTENSION "postgis" ADD VIEW
"public"."geometry_columns";</tt><br>
<br>
</span><o:p></o:p></p>
<div>
<p class="MsoNormal">On 12/23/19 12:26 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">That
looks good as it’s not showing the scripts </span><tt><span
style="font-size:10.0pt">procs need upgrade </span></tt><o:p></o:p></p>
<p class="MsoNormal"><tt><span
style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Message
any more</span></tt><o:p></o:p></p>
<p class="MsoNormal"><tt><span
style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"> </span></tt><o:p></o:p></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.</span></tt><o:p></o:p></p>
<p class="MsoNormal"><tt><span
style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"> </span></tt><o:p></o:p></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.</span></tt><o:p></o:p></p>
<p class="MsoNormal"><tt><span
style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"> </span></tt><o:p></o:p></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.</span></tt><o:p></o:p></p>
<p class="MsoNormal"><tt><span
style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"> </span></tt><o:p></o:p></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.</span></tt><o:p></o:p></p>
<p class="MsoNormal"><tt><span
style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"> </span></tt><o:p></o:p></p>
<p class="MsoNormal"><tt><span
style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">geometry_columns</span></tt><o:p></o:p></p>
<p class="MsoNormal"><tt><span
style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"> </span></tt><o:p></o:p></p>
<p class="MsoNormal"><a
href="https://git.osgeo.org/gitea/postgis/postgis/src/tag/2.5.3/postgis/postgis.sql.in#L5608"
moz-do-not-send="true">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"> </span></tt><o:p></o:p></p>
<p class="MsoNormal"><tt><span
style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black"> </span></tt><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> </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"
moz-do-not-send="true">mailto:postgis-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Bo Guo<br>
<b>Sent:</b> Monday, December 23, 2019 10:54 AM<br>
<b>To:</b> <a
href="mailto:postgis-users@lists.osgeo.org"
moz-do-not-send="true">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>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",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"
moz-do-not-send="true">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"
moz-do-not-send="true">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"
moz-do-not-send="true">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",serif"><br>
</span><tt><span style="font-size:10.0pt">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</span></tt><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",serif"><br>
</span><tt><span style="font-size:10.0pt">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)</span></tt><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"
moz-do-not-send="true">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",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"
moz-do-not-send="true">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"
moz-do-not-send="true">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",serif"> PostGIS_Extensions_Upgrade</span><span
style="font-size:12.5pt">()</span><span
style="font-size:12.5pt;font-family:"Courier
New ,serif",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",serif">
PostGIS_Extensions_Upgrade</span><span
style="font-size:12.5pt">()</span><span
style="font-size:12.5pt;font-family:"Courier
New ,serif",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",serif">
PostGIS_Extensions_Upgrade</span><span
style="font-size:12.5pt">()</span><span
style="font-size:12.5pt;font-family:"Courier
New ,serif",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"
moz-do-not-send="true">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"
moz-do-not-send="true">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",serif">/usr/lib/postgresql/11/lib</span>
to <span
style="font-size:10.0pt;font-family:"Courier
New ,serif",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",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",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" moz-do-not-send="true">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" moz-do-not-send="true">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. Im 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/" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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 Ive 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" moz-do-not-send="true">postgis-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" moz-do-not-send="true">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" moz-do-not-send="true">postgis-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" moz-do-not-send="true">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" moz-do-not-send="true">www.gisticinc.com</a><o:p></o:p></pre>
<pre><a href="http://www.youtube.com/linearbench" moz-do-not-send="true">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>
<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" moz-do-not-send="true">postgis-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" moz-do-not-send="true">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" moz-do-not-send="true">www.gisticinc.com</a><o:p></o:p></pre>
<pre><a href="http://www.youtube.com/linearbench" moz-do-not-send="true">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" moz-do-not-send="true">postgis-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" moz-do-not-send="true">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" moz-do-not-send="true">www.gisticinc.com</a><o:p></o:p></pre>
<pre><a href="http://www.youtube.com/linearbench" moz-do-not-send="true">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" moz-do-not-send="true">www.gisticinc.com</a><o:p></o:p></pre>
<pre><a href="http://www.youtube.com/linearbench" moz-do-not-send="true">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" moz-do-not-send="true">postgis-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><o:p></o:p></pre>
</blockquote>
<pre> <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" moz-do-not-send="true">postgis-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
</div>
</blockquote>
<br>
</body>
</html>