[Pkg-postgresql-public] Bug#694454: pg_ctlcluster should probably have support for numactl and similar wrappers
Christoph Berg
myon at debian.org
Mon Nov 26 14:37:47 UTC 2012
Package: postgresql-common
Version: 134
Severity: wishlist
We should probably consider adding something like the following patch
to pg_ctlcluster. It wraps pg_ctl using numactl. Other uses might be
strace, gdb, and similar things. /etc/postgresql/*/*/pg_ctl.conf seems
like the right spot to configure this, for example using
pg_ctl_wrapper = '...'
=== modified file 'pg_ctlcluster'
--- pg_ctlcluster 2012-11-04 21:39:47 +0000
+++ pg_ctlcluster 2012-11-26 14:31:25 +0000
@@ -171,7 +171,7 @@
# only supply or default logfile path when none is given explicitly in
# postgresql.conf
- @options = ($pg_ctl, 'start', '-D', $info{'pgdata'});
+ @options = ('/usr/bin/numactl', '--interleave=all', $pg_ctl, 'start', '-D', $info{'pgdata'});
$logsize = 0;
if ($info{'logfile'}) {
push @options, ('-l', $info{'logfile'});
@@ -195,7 +195,7 @@
# without this, you'll get zombies on startup
dup2(POSIX::open('/dev/null', POSIX::O_WRONLY), 1);
dup2(POSIX::open('/dev/null', POSIX::O_WRONLY), 2);
- exec $pg_ctl @options or error "could not exec $pg_ctl @options: $!";
+ exec '/usr/bin/numactl', @options or error "could not exec /usr/bin/numactl @options: $!";
}
# wait a bit until the socket exists
Christoph
--
cb at df7cb.de | http://www.df7cb.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-postgresql-public/attachments/20121126/e3f201d5/attachment.pgp>
More information about the Pkg-postgresql-public
mailing list