Debian Bug report logs - #714725
Consider setting APT::NeverAutoRemove::"postgresql-*" in apt.conf

version graph

Package: postgresql; Maintainer for postgresql is Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>; Source for postgresql is src:postgresql-common.

Reported by: Christoph Berg <myon@debian.org>

Date: Tue, 2 Jul 2013 08:27:18 UTC

Severity: wishlist

Found in versions 134, postgresql-common/134wheezy3

Fixed in version postgresql-common/149

Done: Christoph Berg <myon@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>:
Bug#714725; Package postgresql. (Tue, 02 Jul 2013 08:27:23 GMT) Full text and rfc822 format available.

Message #3 received at submit@bugs.debian.org (full text, mbox):

From: Christoph Berg <myon@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Consider setting APT::NeverAutoRemove::"postgresql-*" in apt.conf
Date: Tue, 2 Jul 2013 10:26:28 +0200
[Message part 1 (text/plain, inline)]
Package: postgresql
Version: 9.1+134wheezy3
Severity: wishlist

I've twice seen people on #postgresql who were upgrading from squeeze
to wheezy and ended up with postgresql-8.4 removed and postgresql-9.1
installed, the existing 8.4 cluster being inaccessible. What happened
there is that they have "postgresql" installed, and apt(itude)'s
autoremove feature cleaned the 8.4 package because postgresql is now
9.1.

Technically there is nothing wrong; they should just have paid more
attention to what packages the package manager is going to autoremove,
and noticed that the 8.4 packages should not yet be removed.

However, we should think about making this more user-friendly. Apt
supports exclude lists for autoremoval, the default config already
uses this for kernels and related packages (and metapackages), see
/etc/apt/apt.conf.d/01autoremove. Ubuntu even generates a list of
kernel packages to keep automatically from the kernel postinst in
/etc/kernel/postinst.d/apt-auto-removal.

The question now is which package(s) should be marked as
NeverAutoRemove.

1) The postgresql-x.y package of the (old)stable release
2) ^postgresql-[0-9]+-[0-9]$
3) ^postgresql-.*

2) is probably equivalent to 1), as there's only one version in
stable, and also easier to maintain, because we don't need to deal
with changing the file, and partial upgrades.

3) would be needed if we decide that we also need to care about
extension modules that should not be removed on dist-upgrade. (Though
I tend to think these would usually be manually installed. But we
might have the same metapackage-with-changing-dependency problem there
as well.)

The place to put this would be a static file in the postgresql
package, or a file maintained by postgresql's postinst.

Comments? I'd tend to go for 2) because it's easy and likely to catch
most of the problems.

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/
[signature.asc (application/pgp-signature, inline)]

Marked as found in versions 134. Request was from Christoph Berg <myon@debian.org> to control@bugs.debian.org. (Tue, 02 Jul 2013 08:33:09 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>:
Bug#714725; Package postgresql. (Tue, 02 Jul 2013 11:54:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Eisentraut <petere@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>. (Tue, 02 Jul 2013 11:54:05 GMT) Full text and rfc822 format available.

Message #10 received at 714725@bugs.debian.org (full text, mbox):

From: Peter Eisentraut <petere@debian.org>
To: Christoph Berg <myon@debian.org>, 714725@bugs.debian.org
Subject: Re: [Pkg-postgresql-public] Bug#714725: Consider setting APT::NeverAutoRemove::"postgresql-*" in apt.conf
Date: Tue, 02 Jul 2013 07:44:22 -0400
On 7/2/13 4:26 AM, Christoph Berg wrote:
> The question now is which package(s) should be marked as 
> NeverAutoRemove.
> 
> 1) The postgresql-x.y package of the (old)stable release 2)
> ^postgresql-[0-9]+-[0-9]$ 3) ^postgresql-.*
> 
> 2) is probably equivalent to 1), as there's only one version in 
> stable, and also easier to maintain, because we don't need to deal 
> with changing the file, and partial upgrades.
> 
> 3) would be needed if we decide that we also need to care about 
> extension modules that should not be removed on dist-upgrade.
> (Though I tend to think these would usually be manually installed.
> But we might have the same metapackage-with-changing-dependency
> problem there as well.)

It should be 3), because otherwise the postgresql-contrib-x.y package
will be removed and you won't be able to dump your database if it uses
any data type provided in a contrib module.  The same goes for things
like postgresql-x.y-ip4r.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>:
Bug#714725; Package postgresql. (Tue, 02 Jul 2013 13:45:07 GMT) Full text and rfc822 format available.

Message #13 received at 714725@bugs.debian.org (full text, mbox):

From: Christoph Berg <myon@debian.org>
To: 714725@bugs.debian.org
Subject: Re: [Pkg-postgresql-public] Bug#714725: Consider setting APT::NeverAutoRemove::"postgresql-*" in apt.conf
Date: Tue, 2 Jul 2013 15:42:09 +0200
[Message part 1 (text/plain, inline)]
Re: Peter Eisentraut 2013-07-02 <51D2BD16.6020100@debian.org>
> > 3) would be needed if we decide that we also need to care about 
> > extension modules that should not be removed on dist-upgrade.
> > (Though I tend to think these would usually be manually installed.
> > But we might have the same metapackage-with-changing-dependency
> > problem there as well.)
> 
> It should be 3), because otherwise the postgresql-contrib-x.y package
> will be removed and you won't be able to dump your database if it uses
> any data type provided in a contrib module.  The same goes for things
> like postgresql-x.y-ip4r.

My thinking was that if you have any -contrib package installed, it
will be marked as manually installed and won't be removed
automatically anyway. Same for -ip4r and friends.

Marking all postgresql-* packages for NeverAutoRemove might also be a
bit overzealous, do we want to restrict this to
postgresql-*$laststableversion*? Do we want to drop the
NeverAutoRemove for $laststableversion once the cluster got upgraded?

(This sounds like the solution could get way too complex, I want a
simple thing.)

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>:
Bug#714725; Package postgresql. (Wed, 03 Jul 2013 02:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Eisentraut <petere@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>. (Wed, 03 Jul 2013 02:33:04 GMT) Full text and rfc822 format available.

Message #18 received at 714725@bugs.debian.org (full text, mbox):

From: Peter Eisentraut <petere@debian.org>
To: Christoph Berg <myon@debian.org>, 714725@bugs.debian.org
Subject: Re: Bug#714725: [Pkg-postgresql-public] Bug#714725: Consider setting APT::NeverAutoRemove::"postgresql-*" in apt.conf
Date: Tue, 02 Jul 2013 22:29:42 -0400
On Tue, 2013-07-02 at 15:42 +0200, Christoph Berg wrote:
> Re: Peter Eisentraut 2013-07-02 <51D2BD16.6020100@debian.org>
> > > 3) would be needed if we decide that we also need to care about 
> > > extension modules that should not be removed on dist-upgrade.
> > > (Though I tend to think these would usually be manually installed.
> > > But we might have the same metapackage-with-changing-dependency
> > > problem there as well.)
> > 
> > It should be 3), because otherwise the postgresql-contrib-x.y package
> > will be removed and you won't be able to dump your database if it uses
> > any data type provided in a contrib module.  The same goes for things
> > like postgresql-x.y-ip4r.
> 
> My thinking was that if you have any -contrib package installed, it
> will be marked as manually installed and won't be removed
> automatically anyway. Same for -ip4r and friends.

Could be, but it's not guaranteed.

> Marking all postgresql-* packages for NeverAutoRemove might also be a
> bit overzealous, do we want to restrict this to
> postgresql-*$laststableversion*? Do we want to drop the
> NeverAutoRemove for $laststableversion once the cluster got upgraded?

Marking only the stable version doesn't sound very reliable.  If you
want to guard the data, you have to do it independent of what the
preferred version is.  Users of apt.postgresql.org will have even more
complex requirements.





Information forwarded to debian-bugs-dist@lists.debian.org, Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>:
Bug#714725; Package postgresql. (Tue, 09 Jul 2013 08:09:12 GMT) Full text and rfc822 format available.

Message #21 received at 714725@bugs.debian.org (full text, mbox):

From: Christoph Berg <myon@debian.org>
To: 714725@bugs.debian.org
Subject: Re: Bug#714725: [Pkg-postgresql-public] Bug#714725: Consider setting APT::NeverAutoRemove::"postgresql-*" in apt.conf
Date: Tue, 9 Jul 2013 10:07:50 +0200
[Message part 1 (text/plain, inline)]
Re: Peter Eisentraut 2013-07-03 <1372818582.22689.6.camel@vanquo.pezone.net>
> Marking only the stable version doesn't sound very reliable.  If you
> want to guard the data, you have to do it independent of what the
> preferred version is.  Users of apt.postgresql.org will have even more
> complex requirements.

Nod.

I was thinking about putting something like ^postgresql-.*$VERSION in
the config file when a $VERSION cluster is created, and removing that
once the last $VERSION cluster is removed. That would always keep the
local databases running, and would also enable cleanup once they got
upgraded.

The place to put this would be postgresql-$VERSION.postinst,
pg_createcluster, and/or the init script for creation, and
pg_dropcluster and/or the initscript for removal. (Maybe another call
in *.postinst.)

Too much magic, too complicated? Or the right way to go?

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/
[signature.asc (application/pgp-signature, inline)]

Reply sent to Christoph Berg <myon@debian.org>:
You have taken responsibility. (Mon, 09 Sep 2013 12:51:05 GMT) Full text and rfc822 format available.

Notification sent to Christoph Berg <myon@debian.org>:
Bug acknowledged by developer. (Mon, 09 Sep 2013 12:51:05 GMT) Full text and rfc822 format available.

Message #26 received at 714725-close@bugs.debian.org (full text, mbox):

From: Christoph Berg <myon@debian.org>
To: 714725-close@bugs.debian.org
Subject: Bug#714725: fixed in postgresql-common 149
Date: Mon, 09 Sep 2013 12:48:55 +0000
Source: postgresql-common
Source-Version: 149

We believe that the bug you reported is fixed in the latest version of
postgresql-common, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 714725@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christoph Berg <myon@debian.org> (supplier of updated postgresql-common package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 09 Sep 2013 14:15:18 +0200
Source: postgresql-common
Binary: postgresql-common postgresql-client-common postgresql-server-dev-all postgresql postgresql-client postgresql-doc postgresql-contrib
Architecture: source all
Version: 149
Distribution: unstable
Urgency: low
Maintainer: Debian PostgreSQL Maintainers <pkg-postgresql-public@lists.alioth.debian.org>
Changed-By: Christoph Berg <myon@debian.org>
Description: 
 postgresql - object-relational SQL database (supported version)
 postgresql-client - front-end programs for PostgreSQL (supported version)
 postgresql-client-common - manager for multiple PostgreSQL client versions
 postgresql-common - PostgreSQL database-cluster manager
 postgresql-contrib - additional facilities for PostgreSQL (supported version)
 postgresql-doc - documentation for the PostgreSQL database management system
 postgresql-server-dev-all - extension build tool for multiple PostgreSQL versions
Closes: 714725
Changes: 
 postgresql-common (149) unstable; urgency=low
 .
   * debian/supported-versions: Set default version to 9.3. Drop 9.2 from
     wheezy-backports.
   * /etc/apt/apt.conf.d/01autoremove-postgresql: Mark ^postgresql- as
     NeverAutoRemove, so upgrading the "postgresql" meta package doesn't
     automatically remove access to the old clusters. (Closes: #714725)
   * pg_wrapper: Print a more informative error message when program to execute
     was not found in /usr/lib/postgresql.
   * debian/postgresql-client-common.links: Wrap pg_isready and pg_receivexlog.
Checksums-Sha1: 
 9d84e6102ac9aa85e66a9d40a4e58c6154c20cbf 2151 postgresql-common_149.dsc
 51d3e89d7f2942c7505a6dce4fb2a0ad2f9528fd 165201 postgresql-common_149.tar.gz
 ae57866c45c1f49d244c483c01f7154994955ea2 52422 postgresql-server-dev-all_149_all.deb
 7c6c17c3f81ac32ee7331c7ffcce2e0975f28a47 47654 postgresql_9.3+149_all.deb
 7555e52b62f79dd0e596f42781a3eb3e20f8de41 47676 postgresql-client_9.3+149_all.deb
 6f1d66ccac4c934c4cf34c290be57ffaf88dc790 47652 postgresql-doc_9.3+149_all.deb
 6d317b524e0d1eb63326beb23db15f95e60d8d1e 47676 postgresql-contrib_9.3+149_all.deb
 87ad9a9e773624b2faf651ec1d293deb4fa8d755 143668 postgresql-common_149_all.deb
 c71ce5dafa721f7ab9dfda8d4c1aa193b60c7543 67550 postgresql-client-common_149_all.deb
Checksums-Sha256: 
 01d38095039203b458b858288e510a74d856b885c4db42583a992fc16ecf2354 2151 postgresql-common_149.dsc
 cb0b216fafbc5c6139b2881a02e7f2250630852ba1fb056135ed0578aa690dc9 165201 postgresql-common_149.tar.gz
 9b8a3588892503801151da524b668ec0cbc282ef28acd2ee160ef4a3394017f8 52422 postgresql-server-dev-all_149_all.deb
 a97dab9098b83a8515d71faad83fbdda60b210ea2ee2badec9489483fad457ab 47654 postgresql_9.3+149_all.deb
 c1187c8c6d684f641c19af859f95d9fd2c903e527ebba15bab372b2303ab86a9 47676 postgresql-client_9.3+149_all.deb
 e69a6c22040572ef01358ebf0fa410da5fec3c8ae5669c72f4fbbd479f9c75ee 47652 postgresql-doc_9.3+149_all.deb
 853652a7533e852c3cf74ecf742882053ea2d14b65446aedbf998ee20055f55f 47676 postgresql-contrib_9.3+149_all.deb
 e2ffc76ec91bd22296a6eefab1d52c7963a4316a0271ebf3af940e22ecddd098 143668 postgresql-common_149_all.deb
 90b17aa9d55ef756751bb651f66bce5a49965483bd9255d235cc4d80c9d09d79 67550 postgresql-client-common_149_all.deb
Files: 
 d3b8d14a0b0105996c58acc2262d4a87 2151 database optional postgresql-common_149.dsc
 eed4d80823d60e46ba32fb95c112fcbf 165201 database optional postgresql-common_149.tar.gz
 9fb7e3cf7a419a22bf40fbd0533fd37c 52422 database optional postgresql-server-dev-all_149_all.deb
 743524704e6979267bf02f0bb26010fa 47654 database optional postgresql_9.3+149_all.deb
 11737bb0073c4ba7ee2dde7e9809d387 47676 database optional postgresql-client_9.3+149_all.deb
 68c67ad8cc9e5e2eb52fe764775a4276 47652 doc optional postgresql-doc_9.3+149_all.deb
 d177a128d8bf0a4488f5564425a603dc 47676 database optional postgresql-contrib_9.3+149_all.deb
 c0596991ead5179716cc53e538197c38 143668 database optional postgresql-common_149_all.deb
 69f73631c9900f2f84e9f57c0e6969b8 67550 database optional postgresql-client-common_149_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJSLcIgAAoJEExaa6sS0qeu0f0P/0A5Loq0vFY+pwZHMUfFYI7m
sI5OY+VKfaueRIh0vKwnBRBPZfL92j5Jl4dz1/5sTFa8qm0F8h4jZUDkk3x5sdxm
wYnWvgOQenhlBjZ7gmu3Oi3B22o9Lw+0O8VDM0QKam09a9bpsu6dC9GRv2nV1/9f
6xn4mGKDBCTP2bsiDJArEvaZWeC9Y6SYrX4uX0jwsBXF5dyqRuBgsnqtFQHrvk06
c9WPyeGM6TL5G+7TMlQU64H4hppIEfiXrT6Vv1Cf2Do7CsL33vTqHpwXg133xWDF
IDVoIDRH2Ng206e/xV2K1qQyQbmIaHiwMkR3M1M2cpG96QtK90+OdHKc526xSu3A
DGBoHshHOQ11LbnLz8tFStDQJDJSkH0f+yVZ52VF7NS8KR7sQfS1UBTs7JhdCaNx
jIHzdcQS5uJJnclErc7Xm/gjBNQ3RRwRVvsmGt4GkuPwQEJSRZgfkGnE7nYSCFaj
EK2V3ErWtT7Lo1chtnZouDCk8qK3naJ5FM4ron5PLSXMc33XktvOIrks9kZcUUrc
4hHmM1XFGpkxuX0/9tiEbh5FDmSoMyc1HAXOUNwdo+kpqankjW8Raw1Suv5ET+48
afOUKEASH15FQznyuPE3RpRFvwjbkahIEB6lF1TNmHPB0Garr89Hl5LJfWxnpjnp
iC27U3+CgkNV6IxnMbBQ
=x3O5
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 18 Oct 2013 07:29:55 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 11:26:18 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.