Re: Lazy xid assignment V4

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Lazy xid assignment V4
Date: 2007-09-05 18:34:25
Message-ID: 46DEF6B1.2080009@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> "Florian G. Pflug" <fgp(at)phlo(dot)org> writes:
>> Here is an updated patch, following the discussion.
>> The patch can be found at: http://soc.phlo.org/lazyxidassign.v4.patch
>> (I seems I still can't get attachments through to this list)
>
> Applied with revisions --- mostly cosmetic, but there were a couple of
> things that seemed really broken. In particular, I didn't trust at all
> your use of struct assignment to copy VXIDs into and out of PGPROC.
> I believe that the C compiler is entitled to implement struct assignment
> by bytewise memcpy, for instance, and so it wouldn't be atomic. The
> LocalTransactionId can be fetched or stored atomically, but you have to
> write it as an integer assignment to be sure that that's what happens.
Ah, OK - I wasn't aware of that.

> I also fixed sequence.c to not force XID assignment --- it can perfectly
> well use the LocalTransactionId for what it's doing.
Full ack. I must have missed that user for GetTopTransactionId().

Anyway, thanks for fixing these things.

> Also, I didn't add the proposed regression test, as it seems much too
> fragile --- concurrent autovacuum activity would make it fail, for
> instance.
I was aware that they are fragile, but not that they are *that* fragile ;-)
Anyway they have fullfilled their duty during development, so it's only
fair to let them go now...

Thanks to all of you who helped with making this happen!

greetings, Florian Pflug

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-09-05 18:41:20 Should pointers to PGPROC be volatile-qualified?
Previous Message Tom Lane 2007-09-05 18:30:24 loose ends in lazy-XID-assigment patch

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2007-09-05 19:09:21 Re: [HACKERS] pg_regress config
Previous Message Tom Lane 2007-09-05 18:16:42 Re: Lazy xid assignment V4