Activity log for bug #1042556

Date Who What changed Old value New value Message
2012-08-28 06:14:23 Craig Ringer bug added bug
2012-08-28 06:16:00 Craig Ringer bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=686060
2012-08-28 06:16:00 Craig Ringer bug task added postgresql-common (Debian)
2012-08-28 06:16:11 Craig Ringer postgresql-common (Ubuntu): status New Confirmed
2012-08-28 06:34:40 Martin Pitt postgresql-common (Ubuntu): status Confirmed Fix Released
2012-08-28 06:34:42 Martin Pitt postgresql-common (Ubuntu): importance Undecided High
2012-08-28 06:34:57 Martin Pitt nominated for series Ubuntu Lucid
2012-08-28 06:34:57 Martin Pitt bug task added postgresql-common (Ubuntu Lucid)
2012-08-28 06:34:57 Martin Pitt nominated for series Ubuntu Precise
2012-08-28 06:34:57 Martin Pitt bug task added postgresql-common (Ubuntu Precise)
2012-08-28 06:35:05 Martin Pitt postgresql-common (Ubuntu Lucid): status New Triaged
2012-08-28 06:35:07 Martin Pitt postgresql-common (Ubuntu Precise): status New Triaged
2012-08-28 06:35:21 Martin Pitt postgresql-common (Ubuntu Precise): assignee Martin Pitt (pitti)
2012-08-28 06:35:32 Martin Pitt postgresql-common (Ubuntu Precise): importance Undecided High
2012-08-28 06:35:37 Martin Pitt postgresql-common (Ubuntu Lucid): importance Undecided High
2012-08-28 09:27:34 Bug Watch Updater postgresql-common (Debian): status Unknown New
2012-09-06 13:00:03 Launchpad Janitor branch linked lp:~ubuntu-core-dev/postgresql/common-precise
2012-09-06 13:03:07 Martin Pitt bug added subscriber Ubuntu Stable Release Updates Team
2012-09-06 13:03:17 Martin Pitt postgresql-common (Ubuntu Precise): status Triaged Fix Committed
2012-09-06 13:11:32 Martin Pitt description Hi The Debian packages for PostgreSQL (and thus the Ubuntu packages because of the shared use of pg_wrapper) are subject to a potentially critical data loss bug because of an unsafe procedure for restarting PostgreSQL. This issue has been recognised and patched in Debian: http://anonscm.debian.org/loggerhead/pkg-postgresql/postgresql-common/trunk/revision/1181 http://archives.postgresql.org/pgsql-general/2012-07/msg00501.php but should be urgently included in Ubuntu and backported. 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. 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. See: http://archives.postgresql.org/pgsql-general/2012-07/msg00475.php Context here: 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 Hi The Debian packages for PostgreSQL (and thus the Ubuntu packages because of the shared use of pg_wrapper) are subject to a potentially critical data loss bug because of an unsafe procedure for restarting PostgreSQL. This issue has been recognised and patched in Debian:     http://anonscm.debian.org/loggerhead/pkg-postgresql/postgresql-common/trunk/revision/1181     http://archives.postgresql.org/pgsql-general/2012-07/msg00501.php but should be urgently included in Ubuntu and backported. 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. 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. See:     http://archives.postgresql.org/pgsql-general/2012-07/msg00475.php Context here:     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 SRU INFORMATION: * Impact: Severe data loss in rare corner cases. * Regression potential: Very low. The change has been in Debian, Quantal, and my very popular PostgreSQL backports repository for quite some time. pg_ctlcluster has a function start_check_pid_file() which cleans up a stale PID file on startup if it still exists after pg_ctlcluster stop --force goes to kill -9 the postmaster, so that does not stop a subsequent startup. The test suite (t/030_errors.t) explicitly covers scenarios with missing, broken, and stale PID files and ensures that they are handled properly. * Test case: I do not know a realistic and reliable test case to cause the data loss, but the analysis of the bug in above ML thread is very clear. I suggest to regression-test the change only, i. e. run the postgresql-common test suite and a manual check that starting a cluster still works with a stale pid file being around: sudo pg_createcluster 9.1 test --start sudo cp /var/lib/postgresql/9.1/test/postmaster.pid{,.save} sudo pg_ctlcluster 9.1 test stop # now cause a stale pid file sudo cp /var/lib/postgresql/9.1/test/postmaster.pid{.save,} # this should succeed and say "Removed stale pid file." sudo pg_ctlcluster 9.1 test start # this should say that 9.1/test is online pg_lsclusters
2012-09-06 13:14:10 Launchpad Janitor branch linked lp:~pitti/postgresql/common-lucid
2012-09-06 13:14:50 Martin Pitt postgresql-common (Ubuntu Lucid): status Triaged Fix Committed
2012-09-07 23:11:21 Scott Kitterman bug added subscriber SRU Verification
2012-09-07 23:11:28 Scott Kitterman tags patch-accepted-debian patch-accepted-debian verification-needed
2012-09-07 23:45:28 Launchpad Janitor branch linked lp:ubuntu/lucid-proposed/postgresql-common
2012-09-07 23:45:30 Launchpad Janitor branch linked lp:ubuntu/precise-proposed/postgresql-common
2012-09-18 06:01:46 Martin Pitt tags patch-accepted-debian verification-needed patch-accepted-debian verification-done-precise verification-needed
2012-09-18 06:06:49 Martin Pitt postgresql-common (Ubuntu Lucid): status Fix Committed In Progress
2012-09-20 13:24:03 Scott Kitterman removed subscriber Ubuntu Stable Release Updates Team
2012-09-20 13:24:15 Launchpad Janitor postgresql-common (Ubuntu Precise): status Fix Committed Fix Released
2012-09-27 05:37:04 Scott Kitterman bug added subscriber Ubuntu Stable Release Updates Team
2012-10-04 09:29:04 Bug Watch Updater postgresql-common (Debian): status New Fix Released
2013-01-24 19:36:51 Brian Murray tags patch-accepted-debian verification-done-precise verification-needed patch-accepted-debian removal-candidate verification-done-precise verification-needed
2013-01-25 06:16:22 Martin Pitt tags patch-accepted-debian removal-candidate verification-done-precise verification-needed patch-accepted-debian removal-candidate verification-done
2013-01-25 10:30:17 Launchpad Janitor postgresql-common (Ubuntu Lucid): status In Progress Fix Released