Re: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Noah Misch <noah(at)leadboat(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, Marc-Olaf Jaschke <marc-olaf(dot)jaschke(at)s24(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)
Date: 2016-03-24 20:28:08
Message-ID: CAM3SWZSQnL1m566y_7gp3GVtUfVhsnM9ff3yA5SOmo3oGMYwRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, Mar 24, 2016 at 6:04 AM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> And if not that one, can we find some other way for people to find out if
> they need to REINDEX after the upgrade? It would be very nice not to have to
> tell everybody to reindex everything, but to actually detect the cases where
> it's needed. Or at least provide a supported way to do that, for those where
> a cluster-wide reindex is really expensive.

If amcheck was made to only verify pages in isolation, then it have a
very strong chance of finding any issues, but not an iron-clad
guarantee -- it might be that the ordering was wrong across pages
(although that seems like a very small space for problems to hide).
Because we know that there is a sane total ordering for both strcoll()
and strxfrm() cases on affected systems, I'm pretty sure that the
version of amcheck in the ongoing CF (that checks child/parent, as
well as sibling relationships) would actually catch any problems of
that kind *reliably*. In other words, it would be okay that it didn't
check every item against every other item, because per Tom's analysis
the transitive law is not broken in either case, even if strcoll() is
buggy.

> Even if we can't sneak amcheck into 9.5, if we can show that it detects the
> problem, then just being able to direct people to "get amcheck from 9.6 if
> you want to check if the reindex is necessary" would still be a strong
> improvement over nothing.

Agreed.

--
Peter Geoghegan

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message josnyder 2016-03-24 20:45:50 BUG #14044: Queries immediately conflict with recovery when recovery_min_apply_delay is used
Previous Message Tom Lane 2016-03-24 19:47:03 Re: Re: Missing rows with index scan when collation is not "C" (PostgreSQL 9.5)

Browse pgsql-hackers by date

  From Date Subject
Next Message Christian Ullrich 2016-03-24 20:58:08 Re: Re: [HACKERS] BUG #13854: SSPI authentication failure: wrong realm name used
Previous Message Andreas Karlsson 2016-03-24 19:52:14 Re: NOT EXIST for PREPARE