Re: testing HS/SR - 1 vs 2 performance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: testing HS/SR - 1 vs 2 performance
Date
Msg-id 12382.1272044328@sss.pgh.pa.us
Whole thread Raw
In response to Re: testing HS/SR - 1 vs 2 performance  (Marko Kreen <markokr@gmail.com>)
Responses Re: testing HS/SR - 1 vs 2 performance  (Marko Kreen <markokr@gmail.com>)
List pgsql-hackers
Marko Kreen <markokr@gmail.com> writes:
> Um, you have been burned by exactly this on x86 also:
>   http://archives.postgresql.org/pgsql-hackers/2009-03/msg01265.php

Yeah, we never did figure out exactly how come you were observing that
failure on Intel-ish hardware.  I was under the impression that Intel
machines didn't have weak-memory-ordering behavior.

I wonder whether your compiler had rearranged the code in ProcArrayAdd
so that the increment happened before the array element store at the
machine-code level.  I think it would be entitled to do that under
standard C semantics, since that ProcArrayStruct pointer isn't marked
volatile.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Marko Kreen
Date:
Subject: Re: testing HS/SR - 1 vs 2 performance
Next
From: Robert Haas
Date:
Subject: Re: recovery_connections cannot start (was Re: master in standby mode croaks)