[Pkg-postgresql-public] Bug#686060: postgresql-common: Critical data-loss bug in pg_wrapper init scripts

Craig Ringer ringerc at ringerc.id.au
Tue Aug 28 06:00:29 UTC 2012


Package: postgresql-common
Version: 114
Severity: critical
Justification: causes serious data loss

The Debian packages for PostgreSQL are subject to a potentially critical data loss
bug because of an unsafe procedure for restarting PostgreSQL.

It is VITAL that pg_wrapper NEVER unlink the postmaster.pid file. The postmaster
will do that its self if it finds the pid to be stale, but only after performing
some checks to make sure there are no backends still running and to ensure that
there's no other postmaster running against the database.

This is a critical data loss bug and should be back patched to older versions.

I quote Tom Lane (key PostgreSQL dev):

	[The] forced unlink on the postmaster.pid file [...] (a) is entirely
	unnecessary, and (b) defeats the safety interlock against starting a
	new postmaster before all the old backends have flushed out.

See:

    http://archives.postgresql.org/pgsql-general/2012-07/msg00475.php

and the context:

    http://archives.postgresql.org/pgsql-general/2012-07/msg00350.php
    http://dba.stackexchange.com/questions/20959/recover-postgresql-database-from-wal-errors-on-startup/20961#comment34356_20961




-- System Information:
Debian Release: squeeze/sid
  APT prefers natty-updates
  APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-13-generic (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages postgresql-common depends on:
ii  adduser                3.112+nmu1ubuntu5 add and remove users and groups
ii  debconf [debconf-2.0]  1.5.36ubuntu4     Debian configuration management sy
ii  lsb-base               4.0-0ubuntu11     Linux Standard Base 4.0 init scrip
ii  postgresql-client-comm 114               manager for multiple PostgreSQL cl
ii  procps                 1:3.2.8-10ubuntu3 /proc file system utilities
ii  ssl-cert               1.0.28            simple debconf wrapper for OpenSSL

postgresql-common recommends no packages.

postgresql-common suggests no packages.

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



More information about the Pkg-postgresql-public mailing list