#!/sbin/openrc-run name="patroni" description="Runners to orchestrate a high-availability PostgreSQL" command="/bin/patroni" command_args="/etc/patroni/patroni.yml" command_user="postgres:postgres" command_background="yes" pidfile="/run/${RC_SVCNAME}.pid" # Limit glibc malloc arenas to reduce virtual memory. # Essential when running with vm.overcommit_memory=2. export MALLOC_ARENA_MAX=1 export PG_MALLOC_ARENA_MAX= depend() { need net after firewall use logger } reload() { ebegin "Reloading ${RC_SVCNAME}" start-stop-daemon --signal HUP --pidfile "${pidfile}" eend $? }