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

Re: [HACKERS] BUG #3799: csvlog skips some logs

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, depesz <depesz(at)depesz(dot)com>, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] BUG #3799: csvlog skips some logs
Date: 2007-12-11 15:28:50
Message-ID: 20071211152850.GF10710@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> > Another change I did was to change a "%.*s" to "%*s".  The "precision"
> > marker seems useless AFAICT.
> 
> This is wrong, broken, will cause crashes on platforms where the PS
> string is not null-terminated.  (Hint: .* is a maximum width, * is a
> minimum width.)

Oh, OK.

> Another thing I thought strange was the order of the added columns;
> why isn't it more like the order in which they appear in the text
> version?  In particular hint should probably come just after detail
> and before context, and internal-query should also come before context
> because when relevant it's usually more closely nested than the context
> stack.

Ok, I changed it like you suggest.  I didn't do any other order changes.
I still propose that the log line number should be moved w.r.t. session
identifier.

I changed two more things: the VXID is not reported if not in a backend
(because AuxiliaryProcesses are said to never have one), and added
quotes surrounding the hostname, because in a test here it seems
supported to create an alias for my loopback interface with a name like
"a,b".

-- 
Alvaro Herrera                 http://www.amazon.com/gp/registry/DXLWNGRJD34J
"All rings of power are equal,
But some rings of power are more equal than others."
                                 (George Orwell's The Lord of the Rings)

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2007-12-11 15:31:36
Subject: Re: WORM and Read Only Tables (v0.1)
Previous:From: Tom LaneDate: 2007-12-11 15:19:27
Subject: Re: WORM and Read Only Tables (v0.1)

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-12-11 15:45:22
Subject: Re: [HACKERS] BUG #3799: csvlog skips some logs
Previous:From: Alvaro HerreraDate: 2007-12-11 15:03:22
Subject: Re: [HACKERS] BUG #3799: csvlog skips some logs

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