Bug 90884

Summary: [patch] PostgreSQL startup script doesn't understand faststart and faststop commands
Product: Ports & Packages Reporter: Victor Snezhko <snezhko>
Component: Individual Port(s)Assignee: Palle Girgensohn <girgen>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

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 freebsd_triage 2005-12-24 19:12:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->girgen

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

Committed. Thanks!