clone 646096 -1
reassign 646096 postgresql-9.1 9.1.1-3
tag 646096 pending
thanks

Hello Michaeil,

Michail Bachmann [2011-10-21 11:07 +0200]:
> pg_ctlcluster (16376): /proc/16376/oom_adj is deprecated, please use 
> /proc/16376/oom_score_adj instead.

I just verified that adjusting oom_score_adj will also adjust oom_adj,
so the kernel indeed just has one score, and is just providing a
backwards compatible interface for oom_adj.

> -    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";

That's not quite correct, as oom_score_adj has a different range
(-1000 to 1000). But it's easy enough to fix anyway.

I fixed pg_ctlcluster in bzr now, thanks!

I'm cloning the bug for -9.1, as the postmaster raises the backends
back to 0, and also uses oom_adj.

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Attachment: signature.asc
Description: Digital signature

Reply via email to