pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: PITR potentially broken in 9.2
Date: Wed, 05 Dec 2012 17:23:08 -0500
Message-ID: <15788.1354746188@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmoa73gDR=TXOGE0OmV4MaEgbvNNwV-MB2extakf9-=K6sg@mail.gmail.com>
References: <CAMkU=1zo2j7bVfPDSgaGRffdkoZW2hNCRztDd2hLQSy+eKcpVg@mail.gmail.com>
	<20121205021537.GB9811@awork2.anarazel.de>
	<22653.1354674454@sss.pgh.pa.us>
	<CA+U5nMKOsUWKP++QH=0nMff27t-KbLTEz560CzXz_upn-k1LDQ@mail.gmail.com>
	<20121205143314.GA6420@awork2.anarazel.de>
	<6461.1354723883@sss.pgh.pa.us>
	<20121205162421.GB20456@awork2.anarazel.de>
	<7015.1354725616@sss.pgh.pa.us>
	<CA+U5nM+AHnYOv5+xE0ogFM82gdPfmZ4osRutT-BT2DW3LrGPfA@mail.gmail.com>
	<CA+U5nMKKY4NTJa+i5OJYs2Mh8i=B3249A3ji=L0-hr4c1G7qMw@mail.gmail.com>
	<20121205173025.GD27424@awork2.anarazel.de>
	<8223.1354728999@sss.pgh.pa.us>
	<9918.1354733333@sss.pgh.pa.us>
	<CA+U5nMLfV4OT31df7Uc2BXLM0-NUqk-qdLsYQ5jPTa4Ejwv+sw@mail.gmail.com>
	<12846.1354742138@sss.pgh.pa.us>
	<CA+Tgmoa73gDR=TXOGE0OmV4MaEgbvNNwV-MB2extakf9-=K6sg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Dec 5, 2012 at 4:15 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The argument for this is that although we might fetch a slightly stale
>> value of the shared variable, it can't be very stale --- certainly no
>> older than the spinlock acquisition near the bottom of the previous
>> iteration of the loop.  And this is a highly asynchronous feature
>> anyhow, so fuzziness of plus or minus one WAL record in when the pause
>> gets honored is not going to be detectable.  Hence an extra spinlock
>> acquisition is not worth the cost.

> I wonder whether the cost of an extra spinlock acquire/release cycle
> is really noticeable here.  That can get expensive in a hurry when
> lots of processes are contending the spinlock ... but I think that
> shouldn't be the case here; most of the accesses will be coming from
> the startup process.  Of course atomic operations are much more
> expensive than ordinary CPU instructions even under the best of
> circumstances, but is that really material here?  I'm just wondering
> whether this is premature optimization that's going to potentially
> bite us later in the form of subtle, hard-to-reproduce bugs.

I have the same doubt about whether it's really significant.  However,
I think it's much more likely that we'd find out it is significant than
that we'd find out anybody could detect the lack of a memory barrier
there.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (61+ messages)  latest in thread

Message-ID: <15788.1354746188@sss.pgh.pa.us>
Permalink:  ../15788.1354746188@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15788.1354746188@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, simon@2ndquadrant.com, andres@2ndquadrant.com, jeff.janes@gmail.com, hlinnakangas@vmware.com, noah@leadboat.com
  Subject: Re: PITR potentially broken in 9.2
  In-Reply-To: <15788.1354746188@sss.pgh.pa.us>
  References: <CAMkU=1zo2j7bVfPDSgaGRffdkoZW2hNCRztDd2hLQSy+eKcpVg@mail.gmail.com> <20121205021537.GB9811@awork2.anarazel.de> <22653.1354674454@sss.pgh.pa.us> <CA+U5nMKOsUWKP++QH=0nMff27t-KbLTEz560CzXz_upn-k1LDQ@mail.gmail.com> <20121205143314.GA6420@awork2.anarazel.de> <6461.1354723883@sss.pgh.pa.us> <20121205162421.GB20456@awork2.anarazel.de> <7015.1354725616@sss.pgh.pa.us> <CA+U5nM+AHnYOv5+xE0ogFM82gdPfmZ4osRutT-BT2DW3LrGPfA@mail.gmail.com> <CA+U5nMKKY4NTJa+i5OJYs2Mh8i=B3249A3ji=L0-hr4c1G7qMw@mail.gmail.com> <20121205173025.GD27424@awork2.anarazel.de> <8223.1354728999@sss.pgh.pa.us> <9918.1354733333@sss.pgh.pa.us> <CA+U5nMLfV4OT31df7Uc2BXLM0-NUqk-qdLsYQ5jPTa4Ejwv+sw@mail.gmail.com> <12846.1354742138@sss.pgh.pa.us> <CA+Tgmoa73gDR=TXOGE0OmV4MaEgbvNNwV-MB2extakf9-=K6sg@mail.gmail.com> <15788.1354746188@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox