Your message dated Sat, 07 Sep 2019 14:34:49 +0100 with message-id <[🔎] f49e2985d8466065c49c03185c24465a32228fb5.camel@adam-barratt.org.uk> and subject line Closing bugs for fixes including in 10.1 point release has caused the Debian Bug report #933036, regarding buster-pu: package postgresql-common/200+deb10u2 to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 933036: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933036 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: buster-pu: package postgresql-common/200+deb10u2
- From: Christoph Berg <myon@debian.org>
- Date: Thu, 25 Jul 2019 23:37:36 +0200
- Message-id: <20190725213736.GA13619@msg.df7cb.de>
- Mail-followup-to: Christoph Berg <myon@debian.org>, Debian Bug Tracking System <submit@bugs.debian.org>
Package: release.debian.org Severity: normal Tags: buster User: release.debian.org@packages.debian.org Usertags: pu Please consider postgresql-common 200+deb10u2 for buster. It fixes a critical problem when pg_upgradecluster is used *twice* on the same cluster. (The first upgrade is ok, but the second upgrade will maneuver the system into a state where pg_dropcluster will delete the data of the wrong cluster.) #931635. The actual update is small (don't update postgresql.auto.conf, and when postgresql.auto.conf is already bad, don't read data_directory from it), but the diff also includes test coverage for the problem. Debdiff: No differences were encountered between the control files diff -Nru postgresql-common-200+deb10u1/debian/changelog postgresql-common-200+deb10u2/debian/changelog --- postgresql-common-200+deb10u1/debian/changelog 2019-04-12 14:32:52.000000000 +0200 +++ postgresql-common-200+deb10u2/debian/changelog 2019-07-25 23:04:54.000000000 +0200 @@ -1,3 +1,21 @@ +postgresql-common (200+deb10u2) buster; urgency=high + + DATA LOSS WARNING: pg_upgradecluster from postgresql-common 200, + 200+deb10u1, 201, and 202 will corrupt the data_directory setting when used + *twice* to upgrade a cluster (e.g. 9.6 -> 10 -> 11). This update fixes the + original problem, and also heals affected clusters on the next upgrade. No + additional steps are required. + + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931635 + + * pg_upgradecluster: Don't accidentally set (the wrong!) data_directory in + postgresql.auto.conf. (Closes: #931635) + * PgCommon.pm: Ignore data_directory when set in postgresql.auto.conf. + * pg_upgradecluster: Delete data_directory from postgresql.auto.conf in new + cluster. + + -- Christoph Berg <myon@debian.org> Thu, 25 Jul 2019 23:04:54 +0200 + postgresql-common (200+deb10u1) unstable; urgency=medium * When upgrading from stretch to buster, all text indexes need to be diff -Nru postgresql-common-200+deb10u1/PgCommon.pm postgresql-common-200+deb10u2/PgCommon.pm --- postgresql-common-200+deb10u1/PgCommon.pm 2019-03-01 15:17:21.000000000 +0100 +++ postgresql-common-200+deb10u2/PgCommon.pm 2019-07-25 23:00:10.000000000 +0200 @@ -210,6 +210,7 @@ my $data_directory = cluster_data_directory($version, $cluster, \%conf); my %auto_conf = read_conf_file "$data_directory/postgresql.auto.conf"; foreach my $guc (keys %auto_conf) { + next if ($guc eq 'data_directory'); # defend against pg_upgradecluster bug in 200..202 $conf{$guc} = $auto_conf{$guc}; } } diff -Nru postgresql-common-200+deb10u1/pg_upgradecluster postgresql-common-200+deb10u2/pg_upgradecluster --- postgresql-common-200+deb10u1/pg_upgradecluster 2019-04-12 14:32:49.000000000 +0200 +++ postgresql-common-200+deb10u2/pg_upgradecluster 2019-07-25 23:00:10.000000000 +0200 @@ -67,7 +67,12 @@ }; # adapt paths to configuration files - $set->('data_directory', $newinfo{'pgdata'}); + if ($configfile eq 'postgresql.conf') { + $set->('data_directory', $newinfo{'pgdata'}); + } else { + # fix bug in pg_upgradecluster 200..202 + $deprecate->(\%c, 'data_directory', 'not valid in postgresql.auto.conf'); + } for my $guc (qw(hba_file ident_file external_pid_file stats_temp_directory)) { next unless (defined $c{$guc}); my $val = $c{$guc}; @@ -154,7 +159,7 @@ if ($newversion >= '9.4') { $deprecate->(\%c, 'krb_srvname', 'native krb5 authentication deprecated in favor of GSSAPI'); # grab dsmt from the new config just written by initdb - unless ($c{dynamic_shared_memory_type}) { + if (not $c{dynamic_shared_memory_type} and $configfile eq 'postgresql.conf') { $set->('dynamic_shared_memory_type', ($newinfo{config}->{dynamic_shared_memory_type} || 'mmap')); } } diff -Nru postgresql-common-200+deb10u1/t/040_upgrade.t postgresql-common-200+deb10u2/t/040_upgrade.t --- postgresql-common-200+deb10u1/t/040_upgrade.t 2019-04-12 14:32:49.000000000 +0200 +++ postgresql-common-200+deb10u2/t/040_upgrade.t 2019-07-25 23:00:10.000000000 +0200 @@ -11,7 +11,7 @@ use TestLib; use PgCommon; -use Test::More tests => (@MAJORS == 1) ? 1 : 115 * 3; +use Test::More tests => (@MAJORS == 1) ? 1 : 121 * 3; if (@MAJORS == 1) { pass 'only one major version installed, skipping upgrade tests'; @@ -113,9 +113,12 @@ is_program_out 'postgres', "pg_conftool $MAJORS[0] upgr set log_statement all", 0, '', 'set postgresql.conf parameter'; SKIP: { - skip 'postgresql.auto.conf not supported before 9.4', 2 if ($MAJORS[0] < 9.4); + skip 'postgresql.auto.conf not supported before 9.4', 6 if ($MAJORS[0] < 9.4); + is_program_out 'postgres', "psql -qc \"ALTER SYSTEM SET ident_file = '/etc/postgresql/$MAJORS[0]/upgr/pg_ident.conf'\"", + 0, '', 'set ident_file in postgresql.auto.conf'; is_program_out 'postgres', 'psql -qc "ALTER SYSTEM SET log_min_duration_statement = \'10s\'"', - 0, '', 'set postgresql.auto.conf parameter'; + 0, '', 'set log_min_duration_statement in postgresql.auto.conf'; + is_program_out 'postgres', "echo \"data_directory = '/var/lib/postgresql/$MAJORS[0]/upgr'\" >> /var/lib/postgresql/$MAJORS[0]/upgr/postgresql.auto.conf", 0, "", "Append bogus data_directory setting to postgresql.auto.conf"; } is_program_out 'postgres', 'psql -qc "ALTER DATABASE test SET DateStyle = \'ISO, YMD\'"', 0, '', 'set database parameter'; @@ -148,7 +151,7 @@ # Upgrade to latest version my $outref; -is ((exec_as 0, "(pg_upgradecluster -v $MAJORS[-1] $upgrade_options $MAJORS[0] upgr | sed -e 's/^/STDOUT: /')", $outref, 0), 0, 'pg_upgradecluster succeeds'); +is ((exec_as 0, "(env LC_MESSAGES=C pg_upgradecluster -v $MAJORS[-1] $upgrade_options $MAJORS[0] upgr | sed -e 's/^/STDOUT: /')", $outref, 0), 0, 'pg_upgradecluster succeeds'); like $$outref, qr/Starting target cluster/, 'pg_upgradecluster reported cluster startup'; like $$outref, qr/Success. Please check/, 'pg_upgradecluster reported successful operation'; my @err = grep (!/^STDOUT: /, split (/\n/, $$outref)); @@ -230,8 +233,10 @@ # check config parameters is_program_out 'postgres', 'psql -Atc "SHOW log_statement" test', 0, "all\n", 'check postgresql.conf parameters'; SKIP: { - skip 'postgresql.auto.conf not supported before 9.4', 2 if ($MAJORS[0] < 9.4); + skip 'postgresql.auto.conf not supported before 9.4', 4 if ($MAJORS[0] < 9.4); is_program_out 'postgres', 'psql -Atc "SHOW log_min_duration_statement" test', 0, "10s\n", 'check postgresql.auto.conf parameter'; + is_program_out 'postgres', "cat /var/lib/postgresql/$MAJORS[-1]/upgr/postgresql.auto.conf", 0, + "# Do not edit this file manually!\n# It will be overwritten by the ALTER SYSTEM command.\nident_file = '/etc/postgresql/$MAJORS[-1]/upgr/pg_ident.conf'\nlog_min_duration_statement = '10s'\n#data_directory = '/var/lib/postgresql/$MAJORS[0]/upgr' #not valid in postgresql.auto.conf\n"; } is_program_out 'postgres', 'psql -Atc "SHOW DateStyle" test', 0, "ISO, YMD\n", 'check database parameter'; SKIP: { Thanks, ChristophAttachment: signature.asc
Description: PGP signature
--- End Message ---
--- Begin Message ---
- To: 930795-done@bugs.debian.org, 931126-done@bugs.debian.org, 931198-done@bugs.debian.org, 931199-done@bugs.debian.org, 931358-done@bugs.debian.org, 931596-done@bugs.debian.org, 931608-done@bugs.debian.org, 931615-done@bugs.debian.org, 931616-done@bugs.debian.org, 931724-done@bugs.debian.org, 931817-done@bugs.debian.org, 931967-done@bugs.debian.org, 932009-done@bugs.debian.org, 932030-done@bugs.debian.org, 932069-done@bugs.debian.org, 932111-done@bugs.debian.org, 932193-done@bugs.debian.org, 932318-done@bugs.debian.org, 932335-done@bugs.debian.org, 932441-done@bugs.debian.org, 932448-done@bugs.debian.org, 932518-done@bugs.debian.org, 932522-done@bugs.debian.org, 932588-done@bugs.debian.org, 932606-done@bugs.debian.org, 932684-done@bugs.debian.org, 932790-done@bugs.debian.org, 932945-done@bugs.debian.org, 933036-done@bugs.debian.org, 933125-done@bugs.debian.org, 933147-done@bugs.debian.org, 933175-done@bugs.debian.org, 933369-done@bugs.debian.org, 933379-done@bugs.debian.org, 933392-done@bugs.debian.org, 933535-done@bugs.debian.org, 933754-done@bugs.debian.org, 933764-done@bugs.debian.org, 933769-done@bugs.debian.org, 933787-done@bugs.debian.org, 933899-done@bugs.debian.org, 933911-done@bugs.debian.org, 933976-done@bugs.debian.org, 934094-done@bugs.debian.org, 934163-done@bugs.debian.org, 934183-done@bugs.debian.org, 934308-done@bugs.debian.org, 934311-done@bugs.debian.org, 934329-done@bugs.debian.org, 934343-done@bugs.debian.org, 934345-done@bugs.debian.org, 934507-done@bugs.debian.org, 934537-done@bugs.debian.org, 934650-done@bugs.debian.org, 934689-done@bugs.debian.org, 934704-done@bugs.debian.org, 934826-done@bugs.debian.org, 934827-done@bugs.debian.org, 934928-done@bugs.debian.org, 934934-done@bugs.debian.org, 934956-done@bugs.debian.org, 935137-done@bugs.debian.org, 935165-done@bugs.debian.org, 935200-done@bugs.debian.org, 935253-done@bugs.debian.org, 935261-done@bugs.debian.org, 935265-done@bugs.debian.org, 935308-done@bugs.debian.org, 935370-done@bugs.debian.org, 935386-done@bugs.debian.org, 935411-done@bugs.debian.org, 935465-done@bugs.debian.org, 935474-done@bugs.debian.org, 935479-done@bugs.debian.org, 935480-done@bugs.debian.org, 935576-done@bugs.debian.org, 935583-done@bugs.debian.org, 935704-done@bugs.debian.org, 935707-done@bugs.debian.org, 935719-done@bugs.debian.org, 935746-done@bugs.debian.org, 935770-done@bugs.debian.org, 935776-done@bugs.debian.org, 935809-done@bugs.debian.org, 935815-done@bugs.debian.org, 935827-done@bugs.debian.org, 935888-done@bugs.debian.org, 935957-done@bugs.debian.org, 935988-done@bugs.debian.org, 936022-done@bugs.debian.org, 936056-done@bugs.debian.org, 938954-done@bugs.debian.org, 938975-done@bugs.debian.org, 939019-done@bugs.debian.org
- Cc: 935588@bugs.debian.org
- Subject: Closing bugs for fixes including in 10.1 point release
- From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
- Date: Sat, 07 Sep 2019 14:34:49 +0100
- Message-id: <[🔎] f49e2985d8466065c49c03185c24465a32228fb5.camel@adam-barratt.org.uk>
Version: 10.1 Hi, The fixes referenced by each of these bugs were included in today's buster point release. Regards, Adam
--- End Message ---