pg.ddx.io  pgsql-hackers@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: pgsql-hackers@postgresql.org
Subject: Re: Poorly thought out code in vacuum
Date: Fri, 06 Jan 2012 12:34:44 -0500
Message-ID: <17742.1325871284@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZdbZLhGcdzwgGqPV=kjQioMu3nxm0znToCGTPB7K+gjQ@mail.gmail.com>
References: <25422.1325810273@sss.pgh.pa.us>
	<CA+TgmoYeYaZfa-oKqpu9Y=+vSdQf=kCcRxq-M30JPX4w+vkSpw@mail.gmail.com>
	<CA+U5nM+DZ9jraZ_wCUBqq4+5jpEhrEW13ySpYn40GZmAntM6-Q@mail.gmail.com>
	<CA+TgmobzJz9xRiF=At4nEy2DOnu-gXdeyfP1ajM4BNyFPQfVoA@mail.gmail.com>
	<CA+U5nM+E8WjQ0DbDogAuRupVny53xvhNcJjAV4cJ51iWKSnFKA@mail.gmail.com>
	<CA+TgmobiR=sNTsknS8F8MNqEp1ftbCZHX_YkWEBDCH5+yfnpdQ@mail.gmail.com>
	<17477.1325870695@sss.pgh.pa.us>
	<CA+TgmoZdbZLhGcdzwgGqPV=kjQioMu3nxm0znToCGTPB7K+gjQ@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Jan 6, 2012 at 12:24 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> So at this point I've got serious doubts as to the quality of testing of
>> that whole patch, not just this part.

> I tested the case where we skip a block during the first pass, but I
> admit that I punted on testing the case where we skip a block during
> the second pass, because I couldn't think of a good way to exercise
> it.  Any suggestions?

Hack ConditionalLockBufferForCleanup to have a 50% probability of
failure regardless of anything else, for instance via

	static int ctr = 0;

	if ((++ctr) % 2)
		return false;

			regards, tom lane



view thread (12+ messages)  latest in thread

Message-ID: <17742.1325871284@sss.pgh.pa.us>
Permalink:  ../17742.1325871284@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17742.1325871284@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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, simon@2ndquadrant.com
  Subject: Re: Poorly thought out code in vacuum
  In-Reply-To: <17742.1325871284@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