LOG_PID

Started by Ymiralmost 24 years ago2 messagesbugs
Jump to latest
#1Ymir
ymir@wolfheart.ro

Hello

I'm using the latest Postgres version, and I'm trying to get rid of the PID
of the backend when logging to syslogd. After seeing it's not doable, I
looked at the source only to find:

openlog(Syslog_ident, LOG_PID | LOG_NDELAY, syslog_fac);

Re-reading the docs, I see no mention of the fact that this will only work
for logging to a file (I didn't check the code for that, I don't know if it
works), I must assume this is a bug, something you've overlooked. The fix is
quite easy to do. That is, if I'm not getting something wrong, in which case
I'll apreciate any input.

Thank you for your time and I hope to hear from you.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Ymir (#1)
Re: LOG_PID

Ymir <ymir@wolfheart.ro> writes:

I'm using the latest Postgres version, and I'm trying to get rid of the PID
of the backend when logging to syslogd.

Seems like a fairly bad idea, since you'll then be unable to distinguish
the log outputs from multiple Postgres backends running concurrently.
However, it's surely doable if you remove LOG_PID from the openlog()
call.

Re-reading the docs, I see no mention of the fact that this will only work
for logging to a file (I didn't check the code for that, I don't know if it
works), I must assume this is a bug, something you've overlooked.

I see no bug, and I really don't understand your claim that it only
works for logging to a file. syslog is syslog; where the syslog daemon
sends the log messages is not our concern.

regards, tom lane