Skip site navigation (1) Skip section navigation (2)

Re: GUC option log_pid is not checked [Fwd: Bug#149675:

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org, Ymir <ymir(at)ovid(dot)rdsct(dot)ro>
Subject: Re: GUC option log_pid is not checked [Fwd: Bug#149675:
Date: 2002-06-12 15:20:49
Message-ID: 1023895250.31810.3645.camel@linda (view raw or flat)
Thread:
Lists: pgsql-patches
On Wed, 2002-06-12 at 15:12, Tom Lane wrote:
> Oliver Elphick <olly(at)lfix(dot)co(dot)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(dot)Elphick(at)lfix(dot)co(dot)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 

In response to

Responses

pgsql-patches by date

Next:From: Kristis MakrisDate: 2002-06-12 15:42:01
Subject: Re: UI Update (was: int8 becames string in BDE :-()
Previous:From: Tom LaneDate: 2002-06-12 14:19:17
Subject: Re: WriteBuffer return value

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group