[postgis-devel] About EXTENSION from UNPACKAGED on PostgreSQL 13

Bruce Rindahl bruce.rindahl at gmail.com
Wed Feb 26 15:02:39 PST 2020


Thanks!
Obvious typo, start with pg_dump not pg_restore...

On Wed, Feb 26, 2020 at 1:33 PM Regina Obe <lr at pcorp.us> wrote:

> The only thing to be cautious of is if you are going from 2.something to
> 3.0 and you are using postgis_raster, you will need to install postgis and
> postgis_raster in your new database first.
>
>
>
> If you are using pg_restore, since the functions are not part of the
> backup,
>
> Just the line  CREATE EXTENSION postgis;
>
>
>
> Which doesn’t have the version number (defaults to whatever is your
> default as noted in postgis.control file)  – So if your default is 3+ will
> not have raster support.
>
>
>
> What would happen is if you had raster tables in your dump, they would
> fail to restore, because the postgis_raster types and functions, would not
> get created by the new version of
>
>
>
> CREATE EXTENSION postgis;
>
>
>
>
>
> However if you create your database fresh do CREATE EXTENSION postgis;
> CREATE EXTENSION postgis_raster;
>
>
>
> And then restore your data, all will be fine including your raster tables.
>
>
>
>
>
>
>
>
>
>
>
> *From:* postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] *On
> Behalf Of *Bruce Rindahl
> *Sent:* Wednesday, February 26, 2020 4:13 PM
> *To:* PostGIS Development Discussion <postgis-devel at lists.osgeo.org>
> *Subject:* Re: [postgis-devel] About EXTENSION from UNPACKAGED on
> PostgreSQL 13
>
>
>
> When ever I upgrade, I simply install the new version side by side on the
> same machine but on a different port.  Then I do:
>
> pg_restore -p 5432 mydbase | psql -p 5433 mydbase
>
> and see if anything throws an error.  If everything works, I test it for a
> while and then finally shut them down and swap ports in postgresql.conf
>
> Will this avoid the issue?
>
>
>
> On Wed, Feb 26, 2020 at 12:11 PM Regina Obe <lr at pcorp.us> wrote:
>
> > Presumably 15 years out from the 1.x -> 2.x we can stop worrying about
> > bundling unpackaged postgis into an extension, and just recommend a hard
> > upgrade dump/restore to the hardy souls still running 1.x.
> >
> > P.
> >
>
> We don't need to worry about 1.x cause 1.x can only do a hard upgrade to 2
> or 3.  We never supported soft upgrade from 1.x
> Easy solution there is just to install postgis extension and do
> pg_restore/postgis_restore of your data.
>
> So it's really just the 2.1 -> 3 that are of concern.
> I think now is a fine time to encourage everyone to upgrade to 3 if they
> can so they don't need to suffer any crazy solutions we come up with  :)
>
> Turn this into a convenient emergency.
>
> Thanks,
> Regina
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20200226/68842775/attachment.html>


More information about the postgis-devel mailing list