On Wed, 2002-06-12 at 15:12, Tom Lane wrote:
> Oliver Elphick <olly@lfix.co.uk> writes:
> > The GUC option log_pid is not checked; LOG_PID is used by default,
> > contrary to the documentation. This patch fixes it.
>
> No it doesn't (at least not unless you are also going to propose closing
> and reopening syslog at SIGHUP to deal with changes in log_pid setting).
... partially fixes it :-(
> I'm not convinced that there's anything wrong with the code anyway.
> Do you expect log_timestamp to control whether timestamps are added to
> syslog entries? If so you are out of luck. Perhaps we should just
syslog() recognises LOG_PID as a flag to request logging of PIDs; there
is no equivalent for the timestamp, of course.
> tweak the documentation to make it clearer that log_pid and
> log_timestamp only control the format of non-syslog logging.
OK.
If that is its real purpose, I think both I and the original submitter
misunderstood the intention of this parameter, which certainly doesn't
distinguish between logs via syslog and messages to the log file:
LOG_PID (boolean)
Prefixes each server log message with the process ID of the backend
process. This is useful to sort out which messages pertain to which
connection. The default is off.
Perhaps that should read:
LOG_PID (boolean)
Prefixes each server message in the logfile with the process ID of
the backend process. This is useful to sort out which messages
pertain to which connection. The default is off. This parameter
does not affect messages logged via syslog(), which always contain
the process ID.
I don't actually consider it a good thing to omit the PID in syslog, so
I am happy that this change is not necessary, provided that the
distinction between syslog and logfile is made clear.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
"And he said unto Jesus, Lord, remember me when thou
comest into thy kingdom. And Jesus said unto him,
Verily I say unto thee, To day shalt thou be with me
in paradise." Luke 23:42,43