syslog logging setup broken?

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема syslog logging setup broken?
Дата
Msg-id 200102041431.f14EVi972682@hub.org
обсуждение исходный текст
Ответы Re: syslog logging setup broken?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-bugs
Nic Ferrier (nferrier@tapsellferrier.co.uk) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
syslog logging setup broken?

Long Description
When building from the latest (7.1 beta 4+) CVS I had a problem with syslog logging.

Every time I started the postmaster the logger would fail with the message:
  logger: FATAL 1:  'syslog' is not a valid option name
I eventually tracked this down to being something to do with the postgresql.conf file's specifiying of the logging.

I fixed the problem by commenting out the command to turn on syslog terminal log output.

This led me to examine the startup file supplied for Linux users in more detail. I believe it's broken.

See the example code below.


BTW in case you need to know my system is a Sun running Debian (2.2).

Sample Code
My postgresql.conf looks a bit like this:
 # turn on logging of connections
 log_connections = on

 # make all logs go to syslog and terminal
 # (TF run Postgres with no terminal mostly
 #  but it's usefull when debugging)
 # syslog = 1

When the syslog=1 statement is NOT commented out the server won't start.


The relevant part of the startup file, which I copied from the RedHat example, looks like this:

 if [ ${USE_SYSLOG} = "yes" ]; then
    su - ${PGACCOUNT} -c "(${POSTMASTER} -D ${PGDATA} ${PGOPTS} 2>&1
        | logger -p ${FACILITY}.notice) &" > /dev/null 2>&1 &
 else
    su - ${PGACCOUNT} -c "${POSTMASTER} -D ${PGDATA} ${PGOPTS}
        >> ${PGLOGFILE} 2>&1 &" > /dev/null 2>&1 &
 fi


Now surely this will cause either the syslog or a tmp file to recieve output but not both.

Unless there's something inside the postmaster itself that does these logging operations, in which case the startup
filedoesn't need to pipe to the logger. 

No file was uploaded with this report

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: insert char(1) type by different ways.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: syslog logging setup broken?