[Pkg-postgresql-public] Bug#693958: postgresql-common: Upgrade fails when /var/lib/postgres is a NFS mount point

Hugh Davenport hugh at davenport.net.nz
Mon Nov 26 18:52:25 UTC 2012


Package: postgresql-common
Version: 134wheezy2
Followup-For: Bug #693958

Hi,

Please find attached a patch

Cheers,

Hugh

*** postgresql-common-mount.patch
diff -Naur postgresql-common-134wheezy2/debian/postgresql-common.postinst postgresql-common-134wheezy2-new/debian/postgresql-common.postinst
--- postgresql-common-134wheezy2/debian/postgresql-common.postinst	2012-10-04 09:18:46.000000000 +1300
+++ postgresql-common-134wheezy2-new/debian/postgresql-common.postinst	2012-11-27 07:43:46.063087069 +1300
@@ -27,7 +27,9 @@
 
     # ensure home directory ownership
     mkdir -p /var/lib/postgresql
-    chown postgres:postgres /var/lib/postgresql
+    su - postgres -c "test -O /var/lib/postgresql &&
+            test -G /var/lib/postgresql" || \
+        chown postgres:postgres /var/lib/postgresql
 
     # nicer log directory permissions
     mkdir -p /var/log/postgresql


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages postgresql-common depends on:
ii  adduser                   3.113+nmu3
ii  debconf [debconf-2.0]     1.5.46
ii  logrotate                 3.8.1-4
ii  lsb-base                  4.1+Debian8
ii  postgresql-client-common  134wheezy2
ii  procps                    1:3.3.3-2
ii  ssl-cert                  1.0.32

postgresql-common recommends no packages.

postgresql-common suggests no packages.

-- Configuration Files:
/etc/sysctl.d/30-postgresql-shm.conf changed:
kernel.shmmax = 147431424


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



More information about the Pkg-postgresql-public mailing list