FS#27541 - PostgreSQL init script does not pass the "-m fast" option correctly
Attached to Project:
Arch Linux
Opened by Paul Gideon Dann (giddie) - Monday, 12 December 2011, 12:04 GMT
Last edited by Dan McGee (toofishes) - Monday, 13 February 2012, 04:49 GMT
Opened by Paul Gideon Dann (giddie) - Monday, 12 December 2011, 12:04 GMT
Last edited by Dan McGee (toofishes) - Monday, 13 February 2012, 04:49 GMT
|
Details
Description:
When stopping or restarting postgresql using /etc/rc.d/postgresql, the do_postgres function does not pass the "-m fast" option to pg_ctl. Additional info: * 9.1.2-1 If you make the line look like this: su - postgres -c "echo '$PGCTL_BIN' $(printf '%q ' "${PGCTL_ARGS[@]}") $@" You will see that "echo" sees the "stop" command, but not "-m fast". I'm not entirely sure why; I'm hoping the maintainer has more bash-fu than I do. This really bit me when I wanted to do a quick upgrade to 9.1.2 from 9.1.1, which turned into something somewhat longer as I tried to figure out why Postgres wasn't shutting down properly despite seeing "-m fast" in the init script :s |
This task depends upon
:: Stopping PostgreSQL
su - postgres -c '/usr/bin/pg_ctl' -D /var/lib/postgres/data -l /var/log/postgresql.log -s -w stop -m fast
I'm seeing it get passed along just fine, not sure what is happening in your case...
local args="$@"
su - postgres -c "'$PGCTL_BIN' $(printf '%q ' "${PGCTL_ARGS[@]}") $args"
}
This incantation seems to fix the problem- can you confirm, and if so, it will be in the next version of the package.