pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Peter Geoghegan <pg@heroku.com>
To: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Joshua D. Drake <jd@commandprompt.com>
Cc: Josh berkus <josh@agliodbs.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Jeff Janes <jeff.janes@gmail.com>
Subject: Re: Reviewing freeze map code
Date: Tue, 10 May 2016 23:54:33 -0500
Message-ID: <f8a22607-19fb-15a9-0bc9-2aefbc59bef6@BlueTreble.com> (raw)
In-Reply-To: <1e78ce70-db1e-e639-f758-dc202f56ab5e@BlueTreble.com>
References: <20160506212958.wwwc22hfesvj76af@alap3.anarazel.de>
	<20160506213652.GA288015@alvherre.pgsql>
	<20160506214943.d44r4glxgw2ff2sg@alap3.anarazel.de>
	<CAM3SWZQf7VsUkMtSnzDrA0ECsZgjV07r3kD6XvRR-qJGNLWVnQ@mail.gmail.com>
	<1e78ce70-db1e-e639-f758-dc202f56ab5e@BlueTreble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 5/10/16 11:42 PM, Jim Nasby wrote:
> On 5/6/16 4:55 PM, Peter Geoghegan wrote:
>> On Fri, May 6, 2016 at 2:49 PM, Andres Freund <andres@anarazel.de> wrote:
>>>> Jeff Janes has done astounding work in these matters.  (I don't think
>>>> we credit him enough for that.)
>>>
>>> +many.
>>
>> Agreed. I'm a huge fan of what Jeff has been able to do in this area.
>> I often say so. It would be even better if Jeff's approach to testing
>> was followed as an example by other people, but I wouldn't bet on it
>> ever happening. It requires real persistence and deep understanding to
>> do well.
>
> It takes deep understanding to *design* the tests, not to write them.
> There's a lot of folks out there that will never understand enough to
> design tests meant to expose data corruption but who could easily code
> someone else's design, especially if we provided tools/ways to tweak a
> cluster to make testing easier/faster (such as artificially advancing
> XID/MXID).

Speaking of which, another email in the thread made me realize that 
there's a test condition no one has mentioned: verifying we don't lose 
tuples after wraparound.

To test this, you'd want a table that's mostly frozen. Ideally, dirty a 
single tuple on a bunch of frozen pages, with committed updates, 
deletes, and un-committed inserts. Advance XID far enough to get you 
close to wrap-around. Do a vacuum, SELECT count(*), advance XID past 
wraparound, SELECT count(*) again and you should get the same number.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461


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



view thread (256+ messages)  latest in thread

Message-ID: <f8a22607-19fb-15a9-0bc9-2aefbc59bef6@BlueTreble.com>
Permalink:  ../f8a22607-19fb-15a9-0bc9-2aefbc59bef6@BlueTreble.com/
Also on:    postgresql.org/message-id/f8a22607-19fb-15a9-0bc9-2aefbc59bef6@BlueTreble.com

 · 

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: Jim.Nasby@BlueTreble.com, pg@heroku.com, andres@anarazel.de, alvherre@2ndquadrant.com, jd@commandprompt.com, josh@agliodbs.com, robertmhaas@gmail.com, sawada.mshk@gmail.com, jeff.janes@gmail.com
  Subject: Re: Reviewing freeze map code
  In-Reply-To: <f8a22607-19fb-15a9-0bc9-2aefbc59bef6@BlueTreble.com>

* 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