Re: [PATCHES] log session end - again - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [PATCHES] log session end - again
Date
Msg-id 1797.24.211.141.25.1075855851.squirrel@www.dunslane.net
Whole thread Raw
In response to Re: [PATCHES] log session end - again  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane said:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> Right. And if we have sessionids we would want them logged there, I
>> think. And that would rule out anything based on xid or backend pid.
>
> Uh, what's wrong with backend pid?  Since we fork before we start doing
> anything with a connection, it should surely be available soon enough
> for the connection log message.
>
> Larry's idea about combining PID and backend start time didn't sound
> too unreasonable to me.
>

It did to me too. I was just looking at this code 2 days ago. Somehow when
I looked again I thought we logged connections in the postmaster. Larry's
idea should work just fine. For log compactness I think I'd hexencode it -
the SessionID doesn't need any semantics, it's just like a cookie.

cheers

andrew






pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PITR Dead horse?
Next
From: Jan Wieck
Date:
Subject: BgWriter sync option backed out