Bug 90884 - [patch] PostgreSQL startup script doesn't understand faststart and faststop commands
Summary: [patch] PostgreSQL startup script doesn't understand faststart and faststop c...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Palle Girgensohn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-24 19:10 UTC by Victor Snezhko
Modified: 2005-12-25 20:28 UTC (History)
0 users

See Also:


Attachments
file.diff (711 bytes, patch)
2005-12-24 19:10 UTC, Victor Snezhko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Snezhko 2005-12-24 19:10:02 UTC
PostgreSQL startup script is using it's argument incorrectly.
It assumes that argument will be one of "start", "stop", "reload" and others,
and passes this argument to pg_ctl.
But the argument can be prefixed. "fast" is the prefix that is used on startup
(there are others), and when system is booting, it runs pgsql.sh with 
"faststart" argument, which is happily passed to pg_ctl, and pg_ctl
complains about it, and postgresql isn't started at all, at least on -current

Fix: rc.subr(5) contains code that cleans argument from prefixes, and provides $rc_arg variable as the result.
I suggest changing "$1" to $rc_arg and pass it to pg_ctl
There is a patch against databases/postgresql81-server's script:

=======================================================
How-To-Repeat: install databases/postgresql81-server
add postgresql_enable="YES" to /etc/rc.conf
reboot - at startup and shutdown you will see that pg_ctl complains about 
unknown faststart and faststop commands
Comment 1 Erwin Lansing freebsd_committer 2005-12-24 19:12:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->girgen

Over to maintainer.
Comment 2 Palle Girgensohn freebsd_committer 2005-12-25 20:28:17 UTC
State Changed
From-To: open->closed

Committed. Thanks!