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

From Marko Kreen
Subject Re: testing HS/SR - 1 vs 2 performance
Date
Msg-id s2je51f66da1004231016pc823d9b6yc18a76b32bb3c70e@mail.gmail.com
Whole thread Raw
In response to Re: testing HS/SR - 1 vs 2 performance  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: testing HS/SR - 1 vs 2 performance  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 4/18/10, Simon Riggs <simon@2ndquadrant.com> wrote:
> On Sat, 2010-04-17 at 16:48 -0400, Tom Lane wrote:
>  > There are some places where we suppose that a *single* write into shared
>  > memory can safely be done without a lock, if we're not too concerned
>  > about how soon other transactions will see the effects.  But what you
>  > are proposing here requires more than one related write.
>  >
>  > I've been burnt by this myself:
>  > http://archives.postgresql.org/pgsql-committers/2008-06/msg00228.php
>
>
> W O W - thank you for sharing.
>
>  What I'm not clear on is why you've used a spinlock everywhere when only
>  weak-memory thang CPUs are a problem. Why not have a weak-memory-protect
>  macro that does does nada when the hardware already protects us? (i.e. a
>  spinlock only for the hardware that needs it).

Um, you have been burned by exactly this on x86 also:
 http://archives.postgresql.org/pgsql-hackers/2009-03/msg01265.php

-- 
marko


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: recovery_connections cannot start (was Re: master in standby mode croaks)
Next
From: Tom Lane
Date:
Subject: Re: testing HS/SR - 1 vs 2 performance