Debian Bug report logs - #543506
postgresql-common: pg_upgradecluster doesn't preserve per-database ACLs or configuration parameters

version graph

Package: postgresql-common; Maintainer for postgresql-common is Debian PostgreSQL Maintainers <>; Source for postgresql-common is src:postgresql-common.

Reported by: Matthew Woodcraft <>

Date: Tue, 25 Aug 2009 13:39:03 UTC

Severity: normal

Found in versions postgresql-common/94lenny1, postgresql-common/100

Fixed in version postgresql-common/106

Done: Martin Pitt <>

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, Martin Pitt <>:
Bug#543506; Package postgresql-common. (Tue, 25 Aug 2009 13:39:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthew Woodcraft <>:
New Bug report received and forwarded. Copy sent to Martin Pitt <>. (Tue, 25 Aug 2009 13:39:08 GMT) Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: Matthew Woodcraft <>
To: Debian Bug Tracking System <>
Subject: postgresql-common: pg_upgradecluster doesn't preserve per-database ACLs or configuration parameters
Date: Tue, 25 Aug 2009 14:20:45 +0100
Package: postgresql-common
Version: 94lenny1
Severity: normal

pg_upgradecluster doesn't preserve the contents of pg_database.datconfig
or pg_database.datacl.

(That is, it doesn't preserve the results of 'GRANT foo ON DATABASE bar
TO baz' or 'ALTER DATABASE name SET foo TO bar'.)

I think bug 539772 is a specific case of this issue.

This information isn't provided by either pg_dump or pg_dumpall -g. It
is included in the output of pg_dumpall -s, in the 'Database creation'

Possible strategies for implementing this in pg_upgradecluster might be
to parse the information out of the 'pg_dumpall -s' output, or to
duplicate the dumpCreateDB logic from pg_dumpall.

Information forwarded to, Martin Pitt <>:
Bug#543506; Package postgresql-common. (Thu, 03 Sep 2009 09:57:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Karsten Hilbert <>:
Extra info received and forwarded to list. Copy sent to Martin Pitt <>. (Thu, 03 Sep 2009 09:57:12 GMT) Full text and rfc822 format available.

Message #10 received at (full text, mbox):

From: Karsten Hilbert <>
To: Debian Bug Tracking System <>
Subject: Re: pg_upgradecluster doesn't preserve per-database ACLs or configuration parameters
Date: Thu, 03 Sep 2009 11:45:29 +0200
Package: postgresql-common
Version: 100
Severity: normal

I tend to agree that #539772 is a specific version of this problem.

The per-database settings that are changed from the default and saved in
the database can be read from pg_database:

	select from pg_database where datname = 'gnumed_v12';

datname       | gnumed_v12
datdba        | 16385
encoding      | 6
datcollate    | de_DE.UTF-8
datctype      | de_DE.UTF-8
datistemplate | f
datallowconn  | t
datconnlimit  | -1
datlastsysoid | 11563
datfrozenxid  | 648
dattablespace | 1663
datconfig     | {lc_messages=C,sql_inheritance=on,default_transaction_read_only=on}
datacl        |


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (50, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages postgresql-common depends on:
ii  adduser                       3.110      add and remove users and groups
ii  debconf [debconf-2.0]         1.5.27     Debian configuration management sy
ii  lsb-base                      3.2-23     Linux Standard Base 3.2 init scrip
ii  lsb-release                   3.2-23     Linux Standard Base version report
ii  postgresql-client-common      100        manager for multiple PostgreSQL cl
ii  procps                        1:3.2.8-1  /proc file system utilities

Versions of packages postgresql-common recommends:
ii  ssl-cert                      1.0.23     simple debconf wrapper for OpenSSL

postgresql-common suggests no packages.

-- debconf information:
* postgresql-common/obsolete-major:

Added tag(s) pending. Request was from Martin Pitt <> to (Sun, 04 Apr 2010 21:36:05 GMT) Full text and rfc822 format available.

Reply sent to Martin Pitt <>:
You have taken responsibility. (Mon, 05 Apr 2010 17:28:09 GMT) Full text and rfc822 format available.

Notification sent to Matthew Woodcraft <>:
Bug acknowledged by developer. (Mon, 05 Apr 2010 17:28:09 GMT) Full text and rfc822 format available.

Message #17 received at (full text, mbox):

From: Martin Pitt <>
Subject: Bug#543506: fixed in postgresql-common 106
Date: Mon, 05 Apr 2010 17:24:02 +0000
Source: postgresql-common
Source-Version: 106

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:

  to main/p/postgresql-common/postgresql-client-common_106_all.deb
  to main/p/postgresql-common/postgresql-common_106.dsc
  to main/p/postgresql-common/postgresql-common_106.tar.gz
  to main/p/postgresql-common/postgresql-common_106_all.deb

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

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

Debian distribution maintenance software
Martin Pitt <> (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

Hash: SHA1

Format: 1.8
Date: Mon, 05 Apr 2010 17:58:25 +0200
Source: postgresql-common
Binary: postgresql-common postgresql-client-common
Architecture: source all
Version: 106
Distribution: unstable
Urgency: low
Maintainer: Martin Pitt <>
Changed-By: Martin Pitt <>
 postgresql-client-common - manager for multiple PostgreSQL client versions
 postgresql-common - PostgreSQL database-cluster manager
Closes: 522679 543506 562676 576180
 postgresql-common (106) unstable; urgency=low
   * t/001_packages.t: Check for ".utf8" locale instead of ".UTF-8". This
     seems to be the new canonical spelling now.
   * t/, check_clean(): Require that /var/log/postgresql/ still
     exists. If we remove it entirely, current versions of logcheck complain
     loudly. This was already fixed a while ago in squeeze, this will ensure it
     stays so. (Closes: #576180)
   * t/040_upgrade.t: Check upgrade of database and table ACL, an ALTER
     DATABASE option, and correct upgrading of a custom pg_hba.conf. This
     reproduces #543506.
   * pg_upgradecluster: Rework logic to use "pg_dumpall -s" instead of
     "pg_dumpall -g", to also catch ACLs, global settings, and the like. Drop
     manual database creation and encoding special-cases, since those are being
     taken care of by the -s commands already. (Closes: #543506, #562676)
   * pg_upgradecluster: Re-enable connections after the upgrade is done, not in
   * t/120_pg_upgradecluster_scripts.t: Upgrade scripts should not create
     tables in the "init" phase, since they will be overwritten during
     dump/restore. Change the test case to move table changes into the "finish"
     phase, and update documentation in pg_upgradecluster to point out this
     potential problem.
   * debian/init.d-functions, status(): More appropriate output formatting for
     "status" init script commands. (Closes: #522679)
 94a558c41758a93f81c0c6a19d3ba4d9ce26db74 906 postgresql-common_106.dsc
 32a45cc7310b666978d16193042ea0b714d2521b 1643040 postgresql-common_106.tar.gz
 1398f0bf05685421c2447603aae3fe9667f71c6e 121214 postgresql-common_106_all.deb
 140d946f5016280962863adf431883f6681d0c3a 52008 postgresql-client-common_106_all.deb
 2abf1ddfb6cf96f775a45adb9b7a06e1f5330d2142e293725f51e5d3c67e1ec0 906 postgresql-common_106.dsc
 1112475c0ca6b3fe4bad827cf1bba325ae4c015fcfac9d99005af8181039d3b3 1643040 postgresql-common_106.tar.gz
 b8d3dd49230c9cbfc96efc398b5513739215c45f794d42453f97db0eb974b4ac 121214 postgresql-common_106_all.deb
 c6249c71e189f1abe83d0247bbb722ea584c4b35ea8de02e9f35e3943073b263 52008 postgresql-client-common_106_all.deb
 afabe91d8d36c143ca0a66743582948a 906 database optional postgresql-common_106.dsc
 fb2e85fff712da6e1eed10761890984a 1643040 database optional postgresql-common_106.tar.gz
 5cf7201e9886be8f0ab10309c5b95ccc 121214 database optional postgresql-common_106_all.deb
 742807eeb526c98ac3a9006d2a85fedd 52008 database optional postgresql-client-common_106_all.deb

Version: GnuPG v1.4.10 (GNU/Linux)


Bug archived. Request was from Debbugs Internal Request <> to (Fri, 14 May 2010 07:31:47 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Thu Apr 17 01:10:50 2014; Machine Name:

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