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
--
[email protected] | http://www.df7cb.de/
signature.asc
Description: Digital signature

