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

Re: enable logging of start time/cookie for all backendprocesses

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: enable logging of start time/cookie for all backendprocesses
Date: 2007-08-01 16:36:56
Message-ID: 20070801163656.GC10324@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-patches
Andrew Dunstan wrote:
>
>
> Andrew Dunstan wrote:
>>
>> The attached patch makes a very small but useful change to the behaviour 
>> of log_line_prefix, by enabling the start time (%s) and cookie (%c) 
>> logging to occur for all backends rather than just for session processes 
>> (i.e. backends started for a client connection). We actually need almost 
>> all of this patch, with or without the change in behaviour, so we can put 
>> the cookie in CSVlogs (which I'm still working on), since the cookie+line 
>> number make the natural primary key for the logs. The actual change in 
>> behaviour from this patch comes from the removal of 2 "if (MyProcPort)" 
>> lines in elog.c. Given that, can I sneak this in or should I wait for 8.4 
>> given we're long past feature freeze?
>>
>> Most of this has been factored out (and cleaned up) from my previous 
>> CSVlog patch, so it's not new. I did that so that what is left when I 
>> finish will have a rather smaller footprint, as this part seemed fairly 
>> seperable.
>
> I haven't seen a response to this. If there's no objection I intend to 
> apply this.

I was just looking at it.  I was wondering why didn't you set the start
time in syslogger and bgwriter.  If it isn't necessary for those, why do
you bother setting it in autovac launcher?

I am also wondering if setting it in InitAuxiliaryProcess is redundant
(or rather, whether the extra set in each auxiliary process is redundant
with the call in InitAuxiliaryProcess).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

pgsql-patches by date

Next:From: Andrew DunstanDate: 2007-08-01 17:40:48
Subject: Re: enable logging of start time/cookie for all backend processes
Previous:From: Magnus HaganderDate: 2007-08-01 16:26:32
Subject: Re: enable logging of start time/cookie for all backend processes

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