diff options
author | Tom Lane <tgl@fedoraproject.org> | 2010-01-11 18:11:25 +0000 |
---|---|---|
committer | Tom Lane <tgl@fedoraproject.org> | 2010-01-11 18:11:25 +0000 |
commit | 8c0b3110102786ff58b48b8739da6068b5348d80 (patch) | |
tree | 9264a08efbcd1ea69bd43feed5fe944415239cd9 /postgresql.init | |
parent | 2a1cdc60c9ab67af8f7240a71c6c6edeeb174e99 (diff) | |
download | postgresql-setup-8c0b3110102786ff58b48b8739da6068b5348d80.tar.gz postgresql-setup-8c0b3110102786ff58b48b8739da6068b5348d80.tar.xz postgresql-setup-8c0b3110102786ff58b48b8739da6068b5348d80.zip |
Work around unintelligent kernel OOM-kill algorithm.postgresql-8_4_2-4_fc13
Diffstat (limited to 'postgresql.init')
-rw-r--r-- | postgresql.init | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/postgresql.init b/postgresql.init index 6eb80f5..386ef97 100644 --- a/postgresql.init +++ b/postgresql.init @@ -108,6 +108,8 @@ PGENGINE=/usr/bin PGPORT=5432 PGDATA=/var/lib/pgsql/data PGLOG=/var/lib/pgsql/pgstartup.log +# Value to set as postmaster process's oom_adj +PG_OOM_ADJ=-17 # Override defaults from /etc/sysconfig/pgsql if file is present [ -f /etc/sysconfig/pgsql/${NAME} ] && . /etc/sysconfig/pgsql/${NAME} @@ -177,6 +179,7 @@ start(){ fi echo -n "$PSQL_START" + test x"$PG_OOM_ADJ" != x && echo "$PG_OOM_ADJ" > /proc/self/oom_adj $SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null sleep 2 pid=`pidof -s "$PGENGINE/postmaster"` |