Re: [PATCHES] log session end - again

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] log session end - again
Date: 2004-02-03 16:56:06
Message-ID: 19327.1075827366@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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 ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2004-02-03 17:40:09 Re: Seaching without accents
Previous Message Bruce Momjian 2004-02-03 16:51:36 Re: pg_restore bug in 7.4.1 ?

Browse pgsql-patches by date

  From Date Subject
Next Message Kurt Roeckx 2004-02-03 17:04:30 Re: Fix memcmp() with different sizes.
Previous Message Tom Lane 2004-02-03 16:52:31 Re: fix memcpy() overlap