Re: Postgres logs to syslog LOCAL0

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgres logs to syslog LOCAL0
Дата
Msg-id 9922.1129302371@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Postgres logs to syslog LOCAL0  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Postgres logs to syslog LOCAL0  (han.holl@informationslogik.nl)
Список pgsql-general
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I don't see any SELECT: entry in there.  In fact, SELECT: is coming from
> syslog, not from PostgreSQL.  We only generate the stuff after the
> closing ].

The SELECT: is probably coming from syslog_ident.  I note the following
comment in the Linux man page for syslog(3):

       The parameter ident in the call of openlog() is probably stored  as-is.
       Thus,  if  the  string  it  points  to  is  changed, syslog() may start
       prepending the changed string, and if the string it points to ceases to
       exist,  the  results  are  undefined.  Most portable is to use a string
       constant.

This is troubling since a reload of the config file could well move
things around.  We should probably pass strdup(Syslog_ident) to openlog,
not just Syslog_ident.

However, that doesn't explain the change in facility ...

            regards, tom lane

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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: On "multi-master"
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: On "multi-master"