From: Simon Riggs <simon@2ndQuadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Re: [COMMITTERS] pgsql: Tune GetSnapshotData() during Hot Standby by avoiding loop
Date: Mon, 19 Apr 2010 15:31:29 +0100
Message-ID: <1271687489.8305.18879.camel@ebony> (raw)
In-Reply-To: <13439.1271687068@sss.pgh.pa.us>
References: <20100418180608.16F067541D1@cvs.postgresql.org>
<4BCC07F1.6040405@enterprisedb.com>
<1271664332.8305.17430.camel@ebony>
<4BCC1644.70008@enterprisedb.com>
<1271667922.8305.17650.camel@ebony>
<v2y603c8f071004190455gf18633fbx1a666c17c998b1a1@mail.gmail.com>
<13439.1271687068@sss.pgh.pa.us>
On Mon, 2010-04-19 at 10:24 -0400, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Mon, Apr 19, 2010 at 5:05 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> >> It doesn't seem to be something we should place highly on the list of
> >> events we need protection from, does it?
>
> > Since when do we not protect against race-conditions just because
> > they're low likelihood?
>
> Murphy's law says that the probability of any race condition happening
> in the field is orders of magnitude higher than you think. This has
> been proven true many times ...
Choices are
1. Check RecoveryInProgress() once outside of lock, plus wild rumour of
Murphy
2. Check RecoveryInProgress() before and after holding lock
3. Check RecoveryInProgress() while holding lock
All of which perform better than
4. Revert patch
--
Simon Riggs www.2ndQuadrant.com
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: simon@2ndQuadrant.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, heikki.linnakangas@enterprisedb.com
Subject: Re: Re: [COMMITTERS] pgsql: Tune GetSnapshotData() during Hot Standby by avoiding loop
In-Reply-To: <1271687489.8305.18879.camel@ebony>
* 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