I configured postgres to log through syslog. Unfortunately the postgres init script is hard-coded for postgres logging only. when a empty string is passed to pg_ctl with the -l option postgres fails to start. I made a simple patch to the init script that supports syslog as an example. I tested it in the syslog configuration and postgres now starts correctly. I did not test with regular postgres logging. --- /etc/init.d/postgresql.backup 2006-12-05 05:14:32.000000000 -0800 +++ /etc/init.d/postgresql 2006-12-05 05:18:40.000000000 -0800 @@ -26,7 +26,13 @@ rm -f "$PGDATA/postmaster.pid" fi - su - $PGUSER -c "/usr/bin/pg_ctl start -D '$PGDATA' -s -l '$PGLOG' -o '$PGOPTS'" + LOG_ARGS=""; + + if [ "$PGLOG" != "syslog" ] ; then + LOG_ARGS="-l \'$PGLOG\'" + fi + + su - $PGUSER -c "/usr/bin/pg_ctl start -D '$PGDATA' -s $LOG_ARGS -o '$PGOPTS'" while : do
*** This bug has been marked as a duplicate of 44468 ***