Re: Intermittent regression test failure from index-only scans patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Intermittent regression test failure from index-only scans patch
Date
Msg-id 10942.1318089457@sss.pgh.pa.us
Whole thread Raw
In response to Re: Intermittent regression test failure from index-only scans patch  (Cédric Villemain <cedric.villemain.debian@gmail.com>)
List pgsql-hackers
Cédric Villemain <cedric.villemain.debian@gmail.com> writes:
> 2011/10/8 Tom Lane <tgl@sss.pgh.pa.us>:
>> The diff indicates that the idx_scan count advanced but idx_tup_fetch
>> did not, which is not so surprising here because tenk2 hasn't been
>> modified in some time. �If the autovacuum daemon managed to mark it
>> all-visible before the stats test runs, then an index-only scan will
>> happen, and bingo, no idx_tup_fetch increment (because indeed no heap
>> tuple was fetched).
>> 
>> I'm inclined to fix this by changing the test to examine idx_tup_read
>> not idx_tup_fetch. �Alternatively, we could have the test force
>> enable_indexonlyscan off. �Thoughts?

> No preferences, but is it interesting to add a "vacuum freeze"
> somewhere and check expected result after index-only scan ? (for both
> idx_tup_read and idx_tup_fetch)

This test is only trying to make sure that the stats collection
machinery is working.  I don't think that we should try to coerce things
so that it can check something as context-sensitive as whether an
index-only scan happened.  It's too fragile already --- we've seen
non-reproducible failures here many times before.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: index-only scans
Next
From: Noah Misch
Date:
Subject: Re: [v9.2] Fix Leaky View Problem