From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCHES] log session end - again |
Date: | 2004-02-03 06:06:58 |
Message-ID: | 401F3A82.50004@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
>Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>
>>Bruce Momjian wrote:
>>
>>
>>>Also, Andrew, on your other patch for log_session_info line, Magnus had
>>>the idea of giving each session an id based on the first transaction of
>>>the session.
>>>
>>>
>
>
>
>>I did think about using a cluster-wide sequence, if we can make such a
>>thing (might also be useful for system generated UIDs too).
>>
>>
>
>Not a good idea IMHO. If you do that, then there will be no such thing
>as a purely read-only transaction, because *every* transaction will
>include a nextval() call. That means even read-only transactions cannot
>commit till the disk spins.
>
>If we want a unique id for transient purposes like logging, then make
>some kind of counter in shared memory. Don't use a sequence, it's much
>too heavyweight.
>
>
>
I'm not sure I understand. I didn't suggest that a sequence should be
used for txn ids. For the purpose I had in mind we would call nextval()
once per connection, and, for the other purpose where I suggested it
would be useful, once per "create user". That doesn't seem very heavyweight.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Brown | 2004-02-03 10:36:05 | Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint |
Previous Message | Tom Lane | 2004-02-03 04:07:05 | Re: COPY from question |
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2004-02-03 08:38:15 | Re: pg_generate_sequence and info_schema patch (Was: SELECT |
Previous Message | Tom Lane | 2004-02-03 04:26:17 | Re: fix memcpy() overlap |