Bug 53142 - postgres' 010.pgsql.sh restart sends logs to stdout
Summary: postgres' 010.pgsql.sh restart sends logs to stdout
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: Sergey A. Osokin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-10 13:30 UTC by Fernando Schapachnik
Modified: 2003-06-12 00:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Schapachnik 2003-06-10 13:30:07 UTC
The control script that ships with the postgres port (/usr/local/etc/rc.d/0.10.pgsql.sh)
lacks a parameter in the restart option, causing logs to be send to stdout,
instead of the log file.

Fix: 

restart)
     [ -x ${PGBIN}/pg_ctl ] && {
-       exec su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl restart -s -m fast"
+       exec su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl restart -s -m fast -l ${logfile}"
     }
     ;;--nQnvt7LywucjQBWAsaC4FttkvdWZfKBInQ5KDstHQYYJLRRU
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- 010.pgsql.sh.original       Tue Jun 10 09:12:43 2003
+++ 010.pgsql.sh        Tue Jun 10 09:13:10 2003
@@ -32,7 +32,7 @@
How-To-Repeat: 
Set log_statement = true in ~pgsql/data/postgresql.conf, then issue:

/usr/local/etc/rc.d/010.pgsql.sh restart

Output:

[78040]  LOG:  database system was shut down at 2003-06-09 02:00:13 ART
[78040]  LOG:  checkpoint record is at 0/1A2C2D9C
[78040]  LOG:  redo record is at 0/1A2C2D9C; undo record is at 0/0; shutdown TRUE
[78040]  LOG:  next transaction id: 236987; next oid: 447527
[78040]  LOG:  database system is ready
Comment 1 Palle Girgensohn 2003-06-11 01:15:39 UTC
This is true. I didn't notice since I use syslog. Perhaps it would be a 
better idea to autoconfigure the postgresql port for syslog, but please 
apply this patch in the mean time.

Regards,
Palle, maintainer
Comment 2 Sergey A. Osokin freebsd_committer freebsd_triage 2003-06-12 00:05:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->osa

I'll handle this.
Comment 3 Sergey A. Osokin freebsd_committer freebsd_triage 2003-06-12 00:25:55 UTC
State Changed
From-To: open->closed

Committed, thanks!