Обсуждение: [pgsql-pkg-yum] postgis24_* package

Поиск
Список
Период
Сортировка

[pgsql-pkg-yum] postgis24_* package

От
Justin Pryzby
Дата:
Just curious how the postgis package upgrades are intended to work ?  It seems
to me we need to (for example) install postgis24_96, then run
postgis_upgrade.sql (or UPGRADE EXTENSION).  It looks like PG10 only supported
by postgis24 packages, so that's a needed step in pg_upgrade to PG10 (else PG
upgrade will die after pg_dump --section=pre-data with an error in
loadable_libraries.txt0

Ideally the package would be installable alongside postgis23_96, to avoid
backends being unable to load postgis library (or loading an incompatible
library, crashing, taking down the server and rest of the backends).

However they're not co-installable:
[pryzbyj@database ~]$ rpm -qa |grep postgis
postgis23_96-2.3.3-1.rhel6.x86_64
[pryzbyj@database ~]$ sudo yum install postgis24_96  file /usr/pgsql-9.6/lib/liblwgeom.so from install of
postgis24_96-2.4.0-1.rhel6.x86_64conflicts with file from package postgis23_96-2.3.3-1.rhel6.x86_64 file
/usr/pgsql-9.6/share/extension/address_standardizer.controlfrom install of postgis24_96-2.4.0-1.rhel6.x86_64 conflicts
withfile from package postgis23_96-2.3.3-1.rhel6.x86_64 file /usr/pgsql-9.6/share/extension/address_standardizer.sql
frominstall of postgis24_96-2.4.0-1.rhel6.x86_64 conflicts with file from package postgis23_96-2.3.3-1.rhel6.x86_64
file/usr/pgsql-9.6/share/extension/address_standardizer_data_us.control from install of
postgis24_96-2.4.0-1.rhel6.x86_64conflicts with file from package postgis23_96-2.3.3-1.rhel6.x86_64 file
/usr/pgsql-9.6/share/extension/postgis.controlfrom install of postgis24_96-2.4.0-1.rhel6.x86_64 conflicts with file
frompackage postgis23_96-2.3.3-1.rhel6.x86_64 file /usr/pgsql-9.6/share/extension/postgis_tiger_geocoder.control from
installof postgis24_96-2.4.0-1.rhel6.x86_64 conflicts with file from package postgis23_96-2.3.3-1.rhel6.x86_64 file
/usr/pgsql-9.6/share/extension/postgis_tiger_geocoder.sqlfrom install of postgis24_96-2.4.0-1.rhel6.x86_64 conflicts
withfile from package postgis23_96-2.3.3-1.rhel6.x86_64 file /usr/pgsql-9.6/share/extension/postgis_topology.control
frominstall of postgis24_96-2.4.0-1.rhel6.x86_64 conflicts with file from package postgis23_96-2.3.3-1.rhel6.x86_64
 

Okay, if they're no co-installable, that's fine.  But why does the package name
include the postgis version then ?  For the postgresql96 style package names,
that was to allow co-installation.

Further, how do I actually install postgis24_96 ?  Do I actually have to run
"rpm -e postgis23_96" first ?  Or is some particular yum incanatation intended
to handle that ?  I'm more familiar with Debian's packages, where the file
overlap would've been declated with "Conflicts" metadata (probably against a
postgis-postgresql96 virtual package).  And file being allowed to be replaced
would've been declated with "Replaces" (but maybe not here, since it can and
will cause the server to crash).  And "Conflicts+Replaces" would've been
declared to allow installing postgis24_10, but requiring the removal of the old
package.  I think conflicts alone is sufficient and ideal for this purpose.
https://www.debian.org/doc/debian-policy/#conflicting-binary-packages-conflicts

Under debian I would do "apt-get install postgis23_96- postgis24_10" to remove
one and install the other.  I found yum has this syntax:
"sudo yum install -- -postgis23_96 postgis24_10", but it seems that means
"cancel installation sugggested by previous dependency/recommends/groupinstall"
rather than "uninstall".  Is there a variation requiring removal ??

BTW this page still talks about PG10 beta:
https://yum.postgresql.org/

Also there's a stray/missing quote in the mailto link on this page:
https://yum.postgresql.org/news-10beta-ready-for-testing.php
">us</a>

Thanks,
Justin


-- 
Sent via pgsql-pkg-yum mailing list (pgsql-pkg-yum@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-yum

Re: [pgsql-pkg-yum] postgis24_* package

От
Justin Pryzby
Дата:
On Sun, Oct 08, 2017 at 05:52:29PM -0500, Justin Pryzby wrote:
> Just curious how the postgis package upgrades are intended to work ?  It seems
...
> Further, how do I actually install postgis24_96 ?  Do I actually have to run
> "rpm -e postgis23_96" first ?  Or is some particular yum incanatation intended

I've upgraded nearly all our customers to postgis24_96.  For most this has, at
worst, first required rpm -e postgis2_96.  Here's one, final, issue with our
otherwise up-to-date customers:

[pryzbyj@TELSASOFT01 ~]$ sudo yum install postgis24_96
...
Installing: postgis24_96
x86_64                                                   2.4.0-1.rhel6
pgdg96                                                   9.3 M
Transaction Check Error: file /usr/pgsql-9.6/lib/liblwgeom.so from install of postgis24_96-2.4.0-1.rhel6.x86_64
conflictswith file from package postgis22_96-2.2.5-1.rhel6.x86_64 file
/usr/pgsql-9.6/share/extension/address_standardizer.controlfrom install of postgis24_96-2.4.0-1.rhel6.x86_64 conflicts
withfile from package postgis22_96-2.2.5-1.rhel6.x86_64
 
[...]

[pryzbyj@TELSASOFT01 ~]$ sudo rpm -e postgis22_96
error: Failed dependencies:       postgis is needed by (installed) python-mapscript-5.0.2-3.x86_64

So I ended up having to remove multiple packages in order to upgrade:
[pryzbyj@TELSASOFT01 ~]$ sudo rpm -e python-mapscript.x86_64 postgis22_96-2.2.5-1.rhel6.x86_64

I think postgis24_96 should conflict postgis23_96 (et al) and postgis24_96
should have a redhat equivalent of what in debian's package metadata would be
expressed as Conflicts+Replaces: postgis2_96, forcing removal of postgis2_96.
And optionally Provides: postgis2_96, if it's intended to allow other packages
to "Depend: postgis2_96" for postgis2 rather than enumerating supported version
(Depends: postgis24_96|postgis23_96|postgis22_96).

Justin


-- 
Sent via pgsql-pkg-yum mailing list (pgsql-pkg-yum@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-yum