Commit 5eb2c583 authored by Martin Pitt's avatar Martin Pitt

Drop support for obsolete oom_adj, all kernels in all supported

Debian/Ubuntu releases support oom_score_adj. (See #646245)
parent fd27418e
......@@ -3,6 +3,8 @@ postgresql-common (152) UNRELEASED; urgency=low
[ Martin Pitt ]
* debian/backport-ppa: Drop oneiric/quantal for -9.2, only keep
lucid/precise.
* Drop support for obsolete oom_adj, all kernels in all supported
Debian/Ubuntu releases support oom_score_adj. (See #646245)
[ Christoph Berg ]
* pg_virtualenv: Fix program name in manpage.
......
......@@ -404,11 +404,7 @@ if ($> == 0) {
open F, '>/proc/self/oom_score_adj';
print F "-900\n";
close F;
} elsif (-w '/proc/self/oom_adj') {
open F, '>/proc/self/oom_adj';
print F "-16\n";
close F;
}
}
}
chdir ('/var/lib/postgresql');
......
......@@ -276,17 +276,17 @@ Bob|1
# OOM score adjustment under Linux: postmaster gets bigger shields for >=
# 9.1, but client backends stay at default
my $adj;
open F, "/proc/$master_pid/oom_adj";
open F, "/proc/$master_pid/oom_score_adj";
$adj = <F>;
chomp $adj;
close F;
if ($v >= '9.1') {
cmp_ok $adj, '<=', -5, 'postgres >= 9.1 master has OOM killer protection';
cmp_ok $adj, '<=', -500, 'postgres >= 9.1 master has OOM killer protection';
} else {
is $adj, 0, 'postgres < 9.1 master has no OOM adjustment';
}
open F, "/proc/$client_pid/oom_adj";
open F, "/proc/$client_pid/oom_score_adj";
$adj = <F>;
chomp $adj;
close F;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment