[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] Moving from Postgis 2.5.5 to Postgis 3.0
From:       "Regina Obe" <lr () pcorp ! us>
Date:       2020-09-30 13:31:58
Message-ID: 013001d6972e$12f05b40$38d111c0$ () pcorp ! us
[Download RAW message or body]

This is a multipart message in MIME format.

[Attachment #2 (multipart/alternative)]
This is a multipart message in MIME format.


You don't need to run the perl script if you installed using extensions.
The perl script is only needed if you used what I called "Old Fashioned
using scripts".

 

That said your steps are fine.  You don't need to do not need to go to 2.5.5
in old before going to 3.0 in new.

 

 

One other consideration: 

 

If you are using PostGIS raster, you will need to create your new database
first and then do 

 

 

CREATE EXTENSION postgis; SCHEMA <same schema as you have installed your
9.6>;

CREATE EXTENSION postgis_raster SCHEMA <same schema as you have installed
your 9.6>;

 

Otherwise your raster tables will not load.

 

I'll work on clarifying the instructions in the docs, but if you can think
of a better way of describing it, feel free to provide a patch to the docs.

 

Hope that helps,

Regina

 

 

 

From: postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] On Behalf
Of Reismann, Martin
Sent: Wednesday, September 30, 2020 8:56 AM
To: postgis-users@lists.osgeo.org
Subject: [postgis-users] Moving from Postgis 2.5.5 to Postgis 3.0

 

Hello,

 

I am planning to move from Postgis 2.5.5 (on PostgreSQL 9.6) to Postgis 3.0
(on PostgreSQL 13).

 

I refer to
http://www.postgis.net/docs/postgis_installation.html#hard_upgrade

 

Can I proceed as follows (HARD UPGRADE) ?

- pg_dump database(s) in old system

- install Postgis 3.0 packages on operating system level

- initialization of new database, start the new server, import of users and
groups ...

- restore database(s) in new system (using the perl script given in the link
above)

- ALTER EXTENSION postgis UPDATE TO "3.0.2"; # in new system

 

 

OR

 

Is it still necessary to do an in-place SOFT UPGRADE (ALTER EXTENSION
postgis UPDATE ...) of Postgis 2.5.5  to 3.0 BEFORE starting the procedure
above ?

 

 

There is an older docment which mentions this:

 

https://postgis.net/workshops/postgis-intro/upgrades.html#:~:text=34.2.-,Upg
rading%20PostGIS,is%20available%20to%20the%20database.

"Install the new version of PostgreSQL and the same version of PostGIS you
are using in your old database. You need to match the PostGIS version so
that the dump file function definitions reference an expected version of the
PostGIS library."

 

Regards,

Martin Reismann

 

 

 

 

 

 

 

 

 

 


[Attachment #5 (text/html)]

<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=us-ascii"><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;}
/* 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;
	margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
span.EmailStyle18
	{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;}
--></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'>You \
don&#8217;t need to run the perl script if you installed using extensions.&nbsp; The \
perl script is only needed if you used what I called &#8220;Old Fashioned using \
scripts&#8221;.<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>That said \
your steps are fine. &nbsp;You don&#8217;t need to do not need to go to 2.5.5 in old \
before going to 3.0 in new.<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>One other \
consideration: <o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>If you are \
using PostGIS raster, you will need to create your new database first and then do \
<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>CREATE \
EXTENSION postgis; SCHEMA &lt;same schema as you have installed your \
9.6&gt;;<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>CREATE \
EXTENSION postgis_raster SCHEMA &lt;same schema as you have installed your \
9.6&gt;;<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Otherwise \
your raster tables will not load.<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I&#8217;ll \
work on clarifying the instructions in the docs, but if you can think of a better way \
of describing it, feel free to provide a patch to the docs.<o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hope that \
helps,<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Regina<o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p>&nbsp;</o:p></span></p><div \
style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><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>Reismann, \
Martin<br><b>Sent:</b> Wednesday, September 30, 2020 8:56 AM<br><b>To:</b> \
postgis-users@lists.osgeo.org<br><b>Subject:</b> [postgis-users] Moving from Postgis \
2.5.5 to Postgis 3.0<o:p></o:p></span></p></div></div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><div id=divtagdefaultwrapper><p><span \
style='font-family:"Calibri",sans-serif;color:black'>Hello,<o:p></o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'>I am planning to move from \
Postgis 2.5.5 (on PostgreSQL 9.6) to Postgis 3.0 (on PostgreSQL \
13).<o:p></o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'>I refer to&nbsp;<a \
href="http://www.postgis.net/docs/postgis_installation.html#hard_upgrade" \
id=LPlnk751322>http://www.postgis.net/docs/postgis_installation.html#hard_upgrade</a><o:p></o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'>Can I proceed as \
follows&nbsp;(HARD UPGRADE) ?<o:p></o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'>- pg_dump database(s)&nbsp;in \
old system<o:p></o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'>- install Postgis 3.0 packages \
on operating system level<o:p></o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'>- initialization of \
new&nbsp;database, start the new server, import of users and groups \
...<o:p></o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'>- restore database(s)&nbsp;in \
new system (using the perl script given in the link \
above)<o:p></o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'>-&nbsp;ALTER EXTENSION postgis \
UPDATE&nbsp;TO &quot;3.0.2&quot;; # in new system<o:p></o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'>OR<o:p></o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><div><p \
class=MsoNormal><span style='font-family:"Calibri",sans-serif;color:black'>Is it \
still&nbsp;necessary to do an in-place SOFT UPGRADE (ALTER EXTENSION postgis UPDATE \
...)&nbsp;of Postgis 2.5.5&nbsp; to 3.0 BEFORE starting the procedure above \
?<o:p></o:p></span></p></div><div><p class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><p \
class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><p \
class=MsoNormal><span style='font-family:"Calibri",sans-serif;color:black'>There is \
an older docment which mentions this:<o:p></o:p></span></p></div><div><p \
class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><p \
class=MsoNormal><span style='font-family:"Calibri",sans-serif;color:black'><a \
href="https://postgis.net/workshops/postgis-intro/upgrades.html#:~:text=34.2.-,Upgrading%20PostGIS,is%20available%20to%20the%20database" \
id=LPlnk870694>https://postgis.net/workshops/postgis-intro/upgrades.html#:~:text=34.2. \
-,Upgrading%20PostGIS,is%20available%20to%20the%20database</a>.<o:p></o:p></span></p></div><div><p \
class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'>&quot;Install the new version of \
PostgreSQL and the same version of PostGIS you are using in your old database. You \
need to match the PostGIS version so that the dump file function definitions \
reference an expected version of the PostGIS \
library.&quot;<o:p></o:p></span></p></div><div><p class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><p \
class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'>Regards,<o:p></o:p></span></p></div><div><p \
class=MsoNormal><span style='font-family:"Calibri",sans-serif;color:black'>Martin \
Reismann<o:p></o:p></span></p></div><div><p class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><p \
class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><p \
class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><p \
class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><p \
class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><div><p \
class=MsoNormal><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div><p><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p><p><span \
style='font-family:"Calibri",sans-serif;color:black'><o:p>&nbsp;</o:p></span></p></div></div></div></body></html>



[Attachment #6 (text/plain)]

_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic