2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
1.01k stars 153 forks source link

Debian packages conflict between major releases #42

Closed PierreDucroquet closed 8 years ago

PierreDucroquet commented 8 years ago

Hello

The postgresql-9.5-pglogical and postgresql-9.4-pglogical version 1.2.0-2jessie can not be installed together without --force. They both include the following files:

Shouldn't these files go under /usr/include/postgresql/9.X/server/ ?

Thanks

gregburek commented 8 years ago

Same here when trying to apt-get install postgresql-9.4-pglogical postgresql-9.5-pglogical postgresql-9.6-pglogical

``` # apt-get install postgresql-9.4-pglogical postgresql-9.5-pglogical postgresql-9.6-pglogical Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libedit2 (3.1-20130712-2) libpq5 (9.6.0-1.pgdg14.04+1) libsensors4 (3.3.4-2ubuntu1) libxml2 (2.9.1+dfsg1-3ubuntu4.8) libxslt1.1 (1.1.28-2build1) pgdg-keyring (2014.1) postgresql-9.4 (9.4.9-1.pgdg14.04+1) postgresql-9.5 (9.5.4-1.pgdg14.04+2) postgresql-9.6 (9.6.0-1.pgdg14.04+1) postgresql-client-9.4 (9.4.9-1.pgdg14.04+1) postgresql-client-9.5 (9.5.4-1.pgdg14.04+2) postgresql-client-9.6 (9.6.0-1.pgdg14.04+1) postgresql-client-common (177.pgdg14.04+1) postgresql-common (177.pgdg14.04+1) postgresql-contrib-9.4 (9.4.9-1.pgdg14.04+1) postgresql-contrib-9.5 (9.5.4-1.pgdg14.04+2) postgresql-contrib-9.6 (9.6.0-1.pgdg14.04+1) sgml-base (1.26+nmu4ubuntu1) ssl-cert (1.0.33) sysstat (10.2.0-1) xml-core (0.13+nmu2) Suggested packages: lm-sensors (3.3.4-2ubuntu1) locales-all () postgresql-doc-9.4 (9.4.9-1.pgdg14.04+1) postgresql-doc-9.5 (9.5.4-1.pgdg14.04+2) postgresql-doc-9.6 (9.6.0-1.pgdg14.04+1) libdbd-pg-perl (2.19.3-2) sgml-base-doc (1.99.1) openssl-blacklist (0.5-3) isag (10.2.0-1) debhelper (9.20131227ubuntu1) The following NEW packages will be installed: libedit2 (3.1-20130712-2) libpq5 (9.6.0-1.pgdg14.04+1) libsensors4 (3.3.4-2ubuntu1) libxml2 (2.9.1+dfsg1-3ubuntu4.8) libxslt1.1 (1.1.28-2build1) pgdg-keyring (2014.1) postgresql-9.4 (9.4.9-1.pgdg14.04+1) postgresql-9.4-pglogical (1.2.0-2trusty) postgresql-9.5 (9.5.4-1.pgdg14.04+2) postgresql-9.5-pglogical (1.2.0-2trusty) postgresql-9.6 (9.6.0-1.pgdg14.04+1) postgresql-9.6-pglogical (1.2.0-2trusty) postgresql-client-9.4 (9.4.9-1.pgdg14.04+1) postgresql-client-9.5 (9.5.4-1.pgdg14.04+2) postgresql-client-9.6 (9.6.0-1.pgdg14.04+1) postgresql-client-common (177.pgdg14.04+1) postgresql-common (177.pgdg14.04+1) postgresql-contrib-9.4 (9.4.9-1.pgdg14.04+1) postgresql-contrib-9.5 (9.5.4-1.pgdg14.04+2) postgresql-contrib-9.6 (9.6.0-1.pgdg14.04+1) sgml-base (1.26+nmu4ubuntu1) ssl-cert (1.0.33) sysstat (10.2.0-1) xml-core (0.13+nmu2) 0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded. Need to get 19.3 MB of archives. After this operation, 86.4 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main libpq5 amd64 9.6.0-1.pgdg14.04+1 [127 kB] Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main libedit2 amd64 3.1-20130712-2 [86.7 kB] Get:3 http://packages.2ndquadrant.com/pglogical/apt/ trusty-2ndquadrant/main postgresql-9.4-pglogical amd64 1.2.0-2trusty [622 kB] Get:4 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main pgdg-keyring all 2014.1 [5,898 B] Get:5 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-client-common all 177.pgdg14.04+1 [78.0 kB] Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main libxml2 amd64 2.9.1+dfsg1-3ubuntu4.8 [573 kB] Get:7 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-client-9.4 amd64 9.4.9-1.pgdg14.04+1 [1,078 kB] Get:8 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-common all 177.pgdg14.04+1 [215 kB] Get:9 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main sgml-base all 1.26+nmu4ubuntu1 [12.5 kB] Get:10 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-9.4 amd64 9.4.9-1.pgdg14.04+1 [3,666 kB] Get:11 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main libsensors4 amd64 1:3.3.4-2ubuntu1 [27.2 kB] Get:12 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main libxslt1.1 amd64 1.1.28-2build1 [145 kB] Get:13 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main xml-core all 0.13+nmu2 [23.3 kB] Get:14 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main ssl-cert all 1.0.33 [16.6 kB] Get:15 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main sysstat amd64 10.2.0-1 [283 kB] Get:16 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-client-9.5 amd64 9.5.4-1.pgdg14.04+2 [1,180 kB] Get:17 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-9.5 amd64 9.5.4-1.pgdg14.04+2 [3,908 kB] Get:18 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-client-9.6 amd64 9.6.0-1.pgdg14.04+1 [1,199 kB] Get:19 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-9.6 amd64 9.6.0-1.pgdg14.04+1 [4,009 kB] Get:20 http://packages.2ndquadrant.com/pglogical/apt/ trusty-2ndquadrant/main postgresql-9.5-pglogical amd64 1.2.0-2trusty [303 kB] Get:21 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-contrib-9.4 amd64 9.4.9-1.pgdg14.04+1 [446 kB] Get:22 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-contrib-9.5 amd64 9.5.4-1.pgdg14.04+2 [452 kB] Get:23 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main postgresql-contrib-9.6 amd64 9.6.0-1.pgdg14.04+1 [495 kB] Get:24 http://packages.2ndquadrant.com/pglogical/apt/ trusty-2ndquadrant/main postgresql-9.6-pglogical amd64 1.2.0-2trusty [304 kB] Fetched 19.3 MB in 6s (2,986 kB/s) Preconfiguring packages ... Selecting previously unselected package libedit2:amd64. (Reading database ... 12746 files and directories currently installed.) Preparing to unpack .../libedit2_3.1-20130712-2_amd64.deb ... Unpacking libedit2:amd64 (3.1-20130712-2) ... Selecting previously unselected package libxml2:amd64. Preparing to unpack .../libxml2_2.9.1+dfsg1-3ubuntu4.8_amd64.deb ... Unpacking libxml2:amd64 (2.9.1+dfsg1-3ubuntu4.8) ... Selecting previously unselected package sgml-base. Preparing to unpack .../sgml-base_1.26+nmu4ubuntu1_all.deb ... Unpacking sgml-base (1.26+nmu4ubuntu1) ... Selecting previously unselected package libpq5:amd64. Preparing to unpack .../libpq5_9.6.0-1.pgdg14.04+1_amd64.deb ... Unpacking libpq5:amd64 (9.6.0-1.pgdg14.04+1) ... Selecting previously unselected package libsensors4:amd64. Preparing to unpack .../libsensors4_1%3a3.3.4-2ubuntu1_amd64.deb ... Unpacking libsensors4:amd64 (1:3.3.4-2ubuntu1) ... Selecting previously unselected package libxslt1.1:amd64. Preparing to unpack .../libxslt1.1_1.1.28-2build1_amd64.deb ... Unpacking libxslt1.1:amd64 (1.1.28-2build1) ... Selecting previously unselected package xml-core. Preparing to unpack .../xml-core_0.13+nmu2_all.deb ... Unpacking xml-core (0.13+nmu2) ... Selecting previously unselected package pgdg-keyring. Preparing to unpack .../pgdg-keyring_2014.1_all.deb ... Unpacking pgdg-keyring (2014.1) ... Selecting previously unselected package postgresql-client-common. Preparing to unpack .../postgresql-client-common_177.pgdg14.04+1_all.deb ... Unpacking postgresql-client-common (177.pgdg14.04+1) ... Selecting previously unselected package postgresql-client-9.4. Preparing to unpack .../postgresql-client-9.4_9.4.9-1.pgdg14.04+1_amd64.deb ... Unpacking postgresql-client-9.4 (9.4.9-1.pgdg14.04+1) ... Selecting previously unselected package ssl-cert. Preparing to unpack .../ssl-cert_1.0.33_all.deb ... Unpacking ssl-cert (1.0.33) ... Selecting previously unselected package postgresql-common. Preparing to unpack .../postgresql-common_177.pgdg14.04+1_all.deb ... Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common' Unpacking postgresql-common (177.pgdg14.04+1) ... Selecting previously unselected package postgresql-9.4. Preparing to unpack .../postgresql-9.4_9.4.9-1.pgdg14.04+1_amd64.deb ... Unpacking postgresql-9.4 (9.4.9-1.pgdg14.04+1) ... Selecting previously unselected package postgresql-client-9.5. Preparing to unpack .../postgresql-client-9.5_9.5.4-1.pgdg14.04+2_amd64.deb ... Unpacking postgresql-client-9.5 (9.5.4-1.pgdg14.04+2) ... Selecting previously unselected package postgresql-9.5. Preparing to unpack .../postgresql-9.5_9.5.4-1.pgdg14.04+2_amd64.deb ... Unpacking postgresql-9.5 (9.5.4-1.pgdg14.04+2) ... Selecting previously unselected package postgresql-client-9.6. Preparing to unpack .../postgresql-client-9.6_9.6.0-1.pgdg14.04+1_amd64.deb ... Unpacking postgresql-client-9.6 (9.6.0-1.pgdg14.04+1) ... Selecting previously unselected package postgresql-9.6. Preparing to unpack .../postgresql-9.6_9.6.0-1.pgdg14.04+1_amd64.deb ... Unpacking postgresql-9.6 (9.6.0-1.pgdg14.04+1) ... Selecting previously unselected package postgresql-contrib-9.4. Preparing to unpack .../postgresql-contrib-9.4_9.4.9-1.pgdg14.04+1_amd64.deb ... Unpacking postgresql-contrib-9.4 (9.4.9-1.pgdg14.04+1) ... Selecting previously unselected package postgresql-contrib-9.5. Preparing to unpack .../postgresql-contrib-9.5_9.5.4-1.pgdg14.04+2_amd64.deb ... Unpacking postgresql-contrib-9.5 (9.5.4-1.pgdg14.04+2) ... Selecting previously unselected package postgresql-contrib-9.6. Preparing to unpack .../postgresql-contrib-9.6_9.6.0-1.pgdg14.04+1_amd64.deb ... Unpacking postgresql-contrib-9.6 (9.6.0-1.pgdg14.04+1) ... Selecting previously unselected package sysstat. Preparing to unpack .../sysstat_10.2.0-1_amd64.deb ... Unpacking sysstat (10.2.0-1) ... Selecting previously unselected package postgresql-9.4-pglogical. Preparing to unpack .../postgresql-9.4-pglogical_1.2.0-2trusty_amd64.deb ... Unpacking postgresql-9.4-pglogical (1.2.0-2trusty) ... Selecting previously unselected package postgresql-9.5-pglogical. Preparing to unpack .../postgresql-9.5-pglogical_1.2.0-2trusty_amd64.deb ... Unpacking postgresql-9.5-pglogical (1.2.0-2trusty) ... dpkg: error processing archive /var/cache/apt/archives/postgresql-9.5-pglogical_1.2.0-2trusty_amd64.deb (--unpack): trying to overwrite '/usr/include/postgresql/pglogical_output/compat.h', which is also in package postgresql-9.4-pglogical 1.2.0-2trusty Selecting previously unselected package postgresql-9.6-pglogical. Preparing to unpack .../postgresql-9.6-pglogical_1.2.0-2trusty_amd64.deb ... Unpacking postgresql-9.6-pglogical (1.2.0-2trusty) ... dpkg: error processing archive /var/cache/apt/archives/postgresql-9.6-pglogical_1.2.0-2trusty_amd64.deb (--unpack): trying to overwrite '/usr/include/postgresql/pglogical_output/compat.h', which is also in package postgresql-9.4-pglogical 1.2.0-2trusty Processing triggers for ureadahead (0.100.0-16) ... Errors were encountered while processing: /var/cache/apt/archives/postgresql-9.5-pglogical_1.2.0-2trusty_amd64.deb /var/cache/apt/archives/postgresql-9.6-pglogical_1.2.0-2trusty_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) ```
rodo commented 8 years ago

Same here, our test platform is down, because we use 4 different version on the same host. Hope to see a fix soon

ringerc commented 8 years ago

We'll be merging pglogical and pglogical_output soon, in the process getting rid of the header. The issue will go away then.

If we don't complete that merge in time for the next release I'll look at qualifying the header with a version number. I don't plan to split into dev packages because the header will be removed soon anyway, and that'll just create more compatibility pain getting rid of the packages.

PJMODOS commented 8 years ago

I think we can remove those files from packages as they serve no real purpose anymore.

rodo commented 8 years ago

Can we help on this ? We searched for debian package files to do a PR, but we didn't find them in the repo. We can take time to help build the package if you want.

ringerc commented 8 years ago

On 6 October 2016 at 17:17, Petr Jelinek notifications@github.com wrote:

I think we can remove those files from packages as they serve no real purpose anymore.

Yeah, now that the packages are unified and built in a single step, we no longer need to install the header from the pglogical_output package in order to use it in the pglogical package. Good point.

That makes it trivial to fix for the next point release.

Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

PierreDucroquet commented 8 years ago

Considering this currently prevents co-installation of pglogical for different postgresql releases, thus making one of the features of pglogical (simple upgrade path) unusable in that configuration, would it be possible to fix the packages in a new package revision instead of waiting for the next point release? (Unless of course the next point release is due soon)

ringerc commented 8 years ago

On 7 October 2016 at 19:59, PierreDucroquet notifications@github.com wrote:

Considering this currently prevents co-installation of pglogical for different postgresql releases, thus making one of the features of pglogical (simple upgrade path) unusable in that configuration, would it be possible to fix the packages in a new package revision instead of waiting for the next point release? (Unless of course the next point release is due soon)

It's only an issue if you're doing both on the same host (without a container), and you can work around it by installing from source. I don't personally intend to roll out a fix for this issue alone as there's a lot of urgent work elsewhere.

Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services

rodo commented 8 years ago

Thanks for your answer and took time to look at this point. Our deployment system is all built on Debian, and we have from one to three different version of postgresql on our baremetal server, so good debian package are mandatory for use. Not a problem if you have not time to build a new packager version without bug, we'll do our own package from source, but if you can publish your debian rules files and all other file for packaging it will keep time for us.

PJMODOS commented 8 years ago

fixed in 1.2.1

rodo commented 8 years ago

Thank you very much, for this fix ! It will help us continuing pglogical deployment and usage on our platform.

ringerc commented 8 years ago

Yeah, we had to roll a new release and we just disabled install of the header.

It's still there since pglogical_output and pglogical aren't fully merged yet, but is no longer installed or packaged. ​