Package: postgresql-common
Version: 125
Severity: minor
Tags: patch
Dear Maintainer,
when a Postgresql 9.1. cluster is started the following message is reported
in the kernel log:
----8<--------8<--------8<------
pg_ctlcluster (16376): /proc/16376/oom_adj is deprecated, please use
/proc/16376/oom_score_adj instead.a
---->8-------->8-------->8------
The attached patch fixes this by choosing the non-deprecated file first.
HTH
CU Micha
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 3.0.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages postgresql-common depends on:
ii adduser 3.113
ii debconf [debconf-2.0] 1.5.41
ii logrotate 3.7.8-6
ii lsb-base 3.2-28
ii postgresql-client-common 125
ii procps 1:3.2.8-11
ii ssl-cert 1.0.28
postgresql-common recommends no packages.
postgresql-common suggests no packages.
-- Configuration Files:
/etc/logrotate.d/postgresql-common changed [not included]
/etc/sysctl.d/30-postgresql-shm.conf changed [not included]
-- debconf information excluded
--- pg_ctlcluster 2011-10-12 15:11:13.000000000 +0200
+++ pg_ctlcluster.patched 2011-10-21 10:49:41.000000000 +0200
@@ -359,10 +359,13 @@
if ($> == 0) {
# have the postmaster start with increased OOM killer protection; 9.1 and
# later has builtin support for resetting the adjustment of child processes
- if ($action eq 'start' && $version ge '9.1' && -w '/proc/self/oom_adj') {
- open F, '>/proc/self/oom_adj';
- print F "-16\n";
- close F;
+ if ($action eq 'start' && $version ge '9.1') {
+ my $oom_adj_file = (grep { -w } ('/proc/self/oom_score_adj', '/proc/self/oom_adj'))[0];
+ if (defined $oom_adj_file) {
+ open F, '>', $oom_adj_file;
+ print F "-16\n";
+ close F;
+ }
}
chdir ('/var/lib/postgresql');