Re: Small SSI issues

Lists: pgsql-hackers
From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <drkp(at)csail(dot)mit(dot)edu>,<heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Small SSI issues
Date: 2011-06-11 18:38:31
Message-ID: 4DF36FD7020000250003E4E8@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> Dan Ports wrote:
> On Fri, Jun 10, 2011 at 09:43:58PM +0300, Heikki Linnakangas wrote:

>>> Do checks such as that argue for keeping the volatile flag, or do
>>> you think we can drop it if we make those changes? (That would
>>> also allow dropping a number of casts which exist just to avoid
>>> warnings.)
>>
>> I believe we can drop it, I'll double-check.
>
> Yes, dropping it seems like the thing to do. It's been on my list
> for a while. We are not really getting anything out of declaring it
> volatile since we cast the volatile qualifier away most of the
> time.

I'm not concerned about references covered by
SerializableXactHashLock. I am more concerned about some of the
tests for whether the (MySerializableXact == InvalidSerializableXact)
checks and any other tests not covered by that lock are OK without it
(and OK with it). Since my knowledge of weak memory ordering
behavior is, well, weak I didn't want to try to make that call.

-Kevin


From: Dan Ports <drkp(at)csail(dot)mit(dot)edu>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: heikki(dot)linnakangas(at)enterprisedb(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Small SSI issues
Date: 2011-06-11 20:03:24
Message-ID: 20110611200324.GR26076@csail.mit.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, Jun 11, 2011 at 01:38:31PM -0500, Kevin Grittner wrote:
> I'm not concerned about references covered by
> SerializableXactHashLock. I am more concerned about some of the
> tests for whether the (MySerializableXact == InvalidSerializableXact)
> checks and any other tests not covered by that lock are OK without it
> (and OK with it). Since my knowledge of weak memory ordering
> behavior is, well, weak I didn't want to try to make that call.

Oh, those checks are definitely not an issue -- MySerializableXact
itself (the pointer, not the thing it's pointing to) is in
backend-local memory, so it won't change under us.

The volatile qualifier (as written) doesn't help with that anyway, it
attaches to the data being pointed to, not the pointer itself.

Dan

--
Dan R. K. Ports MIT CSAIL http://drkp.net/