Re: [PATCHES] log session end - again

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] log session end - again
Date: 2004-02-03 18:10:46
Message-ID: 401FE426.9030101@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:

>Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>
>
>>Andrew Dunstan wrote:
>>
>>
>>>Bruce and others have suggested that PID is not sufficiently unique.
>>>
>>>
>
>
>
>>The nice things about using xid for session id is that is is unique for
>>a long time, rather than pid.
>>
>>
>
>Hmm. Now that I think about it, InitPostgres() always runs a
>transaction during backend startup. If we simply saved aside the XID
>assigned to that transaction, it would cost next to nothing to do and
>would provide a reasonably unique ID. However, this happens much later
>than the postmaster currently prints the log_connection message ...
>
>
>

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.
OTOH I am quite sure I can implement the time based counter idea I
suggested earlier with a very small amount of disturbance and very low
cost. Unless someone can see a flaw in the scheme.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul Ramsey 2004-02-03 18:17:54 Re: PostGIS dropgeometrycolumn function (Was: Re: [7.4]
Previous Message Euler Taveira de Oliveira 2004-02-03 17:40:09 Re: Seaching without accents

Browse pgsql-patches by date

  From Date Subject
Next Message Mark Cave-Ayland 2004-02-03 19:51:42 Re: ANALYZE patch for review
Previous Message Tom Lane 2004-02-03 17:09:10 Re: Fix memcmp() with different sizes.