package postgresql-client-9.3 9.3.5-0ubuntu0.14.04.1 failed to upgrade: alternative pg_basebackup.1.gz can't be slave of psql.1.gz

Bug #1357682 reported by Michael Roppel
132
This bug affects 23 people
Affects Status Importance Assigned to Milestone
postgresql-common (Ubuntu)
Fix Released
High
Martin Pitt
Precise
Invalid
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned
Vivid
Fix Released
High
Martin Pitt

Bug Description

Error while do-release-upgrade from 12.04 to 14.04

SRU TEST CASE:
# Run these commands in a precise schroot:
apt-get install -y postgresql-9.1 man-db
echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list
apt-get update
apt-get install -y --force-yes postgresql-9.4
man pg_basebackup # this should be for 9.4
# this will fail with current postgresql-common (backport of 166), but ought to succeed with a fixed package
dpkg-reconfigure postgresql-9.1
man pg_basebackup # this should still be for 9.4
# after that, this should also succeed
dpkg-reconfigure postgresql-9.4

SRU FIX: https://alioth.debian.org/scm/loggerhead/pkg-postgresql/postgresql-common/trunk/revision/1591

SRU REGRESSION POTENTIAL: Errors in the p-common maintainer script can potentially lead to complete installation failure of any postgresql-X.Y and postgresql-client-X.Y package. The postgresql-X.Y autopkgtests will cover this for one version, but for multiple versions in parallel this should be manually verified.

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: postgresql-client-9.3 9.3.5-0ubuntu0.14.04.1
ProcVersionSignature: Ubuntu 3.8.0-29.42~precise1-generic 3.8.13.5
Uname: Linux 3.8.0-29-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.3
Architecture: amd64
Date: Sat Aug 16 11:41:04 2014
DuplicateSignature: package:postgresql-client-9.3:9.3.5-0ubuntu0.14.04.1:ErrorMessage: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
ErrorMessage: ErrorMessage: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
InstallationDate: Installed on 2014-03-09 (159 days ago)
InstallationMedia: Ubuntu-Server 12.04.3 LTS "Precise Pangolin" - Release amd64 (20130820.2)
SourcePackage: postgresql-9.3
Title: package postgresql-client-9.3 9.3.5-0ubuntu0.14.04.1 failed to install/upgrade: ErrorMessage: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
UpgradeStatus: Upgraded to trusty on 2014-08-16 (0 days ago)

Revision history for this message
Michael Roppel (roppel) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in postgresql-9.3 (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

This is very similar to bug 1270597, apparently the fix there still was not sufficient.

summary: - package postgresql-client-9.3 9.3.5-0ubuntu0.14.04.1 failed to
- install/upgrade: ErrorMessage: Unterprozess installiertes post-
- installation-Skript gab den Fehlerwert 2 zurück
+ package postgresql-client-9.3 9.3.5-0ubuntu0.14.04.1 failed to upgrade:
+ alternative pg_basebackup.1.gz can't be slave of psql.1.gz
affects: postgresql-9.3 (Ubuntu) → postgresql-common (Ubuntu)
Changed in postgresql-common (Ubuntu):
importance: Undecided → High
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

We just had such a case in our data center on precise. That has a backported postgresql-common 154 installed, postgresql-9.1 from precise, and a backported p-9.3. Upgrading 9.3 after 9.1 works ok, as p-common's _link_manpages() takes care of the transition in that direction. But upgrading 9.1 after 9.3 fails because precise's postgresql-9.1 still ships pg_basebackup.1.gz in the server package and alternative group. But at that time -9.3 will already have transitioned it to the psql.1.gz alternative group.

A quick workaround is

   sudo update-alternatives --remove psql.1.gz /usr/share/postgresql/9.3/man/man1/psql.1.gz
   sudo apt-get -f install

This will hold until you upgrade 9.3 and then 9.1 again, at which point the same workaround will apply again.

Changed in postgresql-common (Ubuntu):
status: Confirmed → In Progress
milestone: none → ubuntu-15.02
Martin Pitt (pitti)
description: updated
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

This actually doesn't affect precise's postgresql-common itself. Newer (i. e. backported) postgresql-X.Y versions also require a backported postgresql-common, so instead this fix needs to land in vivid, apt.postgresql.org, and whichever other backport sources people use. I'll update https://launchpad.net/~pitti/+archive/ubuntu/postgresql too.

description: updated
Changed in postgresql-common (Ubuntu Precise):
status: New → Invalid
Changed in postgresql-common (Ubuntu Vivid):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Trusty SRU uploaded.

Changed in postgresql-common (Ubuntu Trusty):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package postgresql-common - 166bzr1

---------------
postgresql-common (166bzr1) vivid; urgency=medium

  [ Christoph Berg ]
  * pg_conftool: Fix 'remove' operation. Spotted by François Henry, merci!
    (Closes: #778243)
  * t/007_pg_conftool.t: Add pg_conftool tests.

  [ Martin Pitt ]
  * debian/maintscripts-functions: Avoid package installation failure of -9.1
    due to the pg_basebackup.1 alternative on systems which have both -9.1 and
    a later version installed in parallel. On those, pg_basebackup.1 will
    already be in the psql.1.gz group, thus -9.1 must not try to put it back
    into the postmaster.1.gz group. (LP: #1357682)
 -- Martin Pitt <email address hidden> Mon, 16 Feb 2015 12:31:20 +0100

Changed in postgresql-common (Ubuntu Vivid):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Michael, or anyone else affected,

Accepted postgresql-common into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/postgresql-common/154ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in postgresql-common (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : [postgresql-common/trusty] possible regression found

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of postgresql-common from trusty-proposed was performed and bug 1428738 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and tag 1428738 "bot-stop-nagging". Thanks!

tags: added: verification-failed
Revision history for this message
Martin Pitt (pitti) wrote :

While bug 1428738 is a bug, it's not a regression, this part of the code hasn't changed in ages. It's mostly the act of restarting postgresql which exhibits this, which usually happens on package upgrades.

tags: added: bot-stop-nagging
removed: verification-failed
Revision history for this message
Mathew Hodson (mhodson) wrote :

It's bug 1428738 that needed to be tagged.

tags: removed: bot-stop-nagging
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of postgresql-common from trusty-proposed was performed and bug 1431253 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and tag 1431253 "bot-stop-nagging". Thanks!

tags: added: verification-failed
Revision history for this message
Martin Pitt (pitti) wrote :

I triaged bug 1431253 (it's invalid).

tags: removed: verification-failed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of postgresql-common from trusty-proposed was performed and bug 1432202 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and tag 1432202 "bot-stop-nagging". Thanks!

tags: added: verification-failed
Martin Pitt (pitti)
tags: removed: verification-failed
Revision history for this message
Martin Pitt (pitti) wrote :

I ran the test case with version 154 from trusty and get the failure. I re-ran it with 154ubuntu1 from trusty-proposed and both -9.1 and -9.4 now succeed. This is self-verification, but as nobody else verified this in the past 50 days and the next point release will come at some point, let's get this out there to avoid further hassle.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package postgresql-common - 154ubuntu1

---------------
postgresql-common (154ubuntu1) trusty-proposed; urgency=medium

  * debian/maintscripts-functions: Avoid package installation failure of -9.1
    due to the pg_basebackup.1 alternative on systems which have both -9.1 and
    a later version installed in parallel. On those, pg_basebackup.1 will
    already be in the psql.1.gz group, thus -9.1 must not try to put it back
    into the postmaster.1.gz group. (LP: #1357682)
 -- Martin Pitt <email address hidden> Mon, 16 Feb 2015 12:35:43 +0100

Changed in postgresql-common (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for postgresql-common has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.