Re: Lazy xid assignment V4

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

"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.
I also fixed sequence.c to not force XID assignment --- it can perfectly
well use the LocalTransactionId for what it's doing.

Also, I didn't add the proposed regression test, as it seems much too
fragile --- concurrent autovacuum activity would make it fail, for
instance.

There are a couple of loose ends, which I'll post about separately
on -hackers.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-09-05 18:30:24 loose ends in lazy-XID-assigment patch
Previous Message Tom Lane 2007-09-05 16:56:03 Re: Lazy xid assignment V4

Browse pgsql-patches by date

  From Date Subject
Next Message Florian G. Pflug 2007-09-05 18:34:25 Re: Lazy xid assignment V4
Previous Message Bruce Momjian 2007-09-05 17:25:46 Re: HOT patch - version 15