Re: [HACKERS] Bug in abbreviated keys abort handling (found with amcheck)

2016-08-22 Thread Peter Geoghegan
On Mon, Aug 22, 2016 at 12:34 PM, Robert Haas  wrote:
> Ugh, that sucks. Thanks for the report and patch.  Committed and
> back-patched to 9.5.

Thanks.

Within Heroku, there is a lot of enthusiasm for the idea of sharing
hard data about the prevalence of problems like this. I hope to be
able to share figures in the next few weeks, when I finish working
through the backlog.

Separately, I would like amcheck to play a role in how we direct users
to REINDEX, as issues like this come to light. It would be much more
helpful if we didn't have to be so conservative. I hesitate to say
that amcheck will detect cases where this bug led to corruption with
100% reliability, but I think that any case that one can imagine in
which amcheck fails here is unlikely in the extreme. The same applies
to the glibc abbreviated keys issue.

I actually didn't find any glibc strxfrm() issues yet, even though any
instances of corruption of text indexes I've seen originated before
the point release in which strxfrm() became distrusted. I guess that
not that many Heroku users use the "C" locale, which would still be
affected with the latest point release.

-- 
Peter Geoghegan


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


Re: [HACKERS] Bug in abbreviated keys abort handling (found with amcheck)

2016-08-22 Thread Robert Haas
On Fri, Aug 19, 2016 at 6:07 PM, Peter Geoghegan  wrote:
> I found another bug as a result of using amcheck on Heroku customer
> databases. This time, the bug is in core Postgres. It's one of mine.
>
> There was a thinko in tuplesort's abbreviation abort logic, causing
> certain SortTuples to be spuriously marked NULL (and so, subsequently
> sorted as a NULL tuple, despite not actually changing anything about
> the representation of caller tuples). The attached patch fixes this
> bug.

Ugh, that sucks. Thanks for the report and patch.  Committed and
back-patched to 9.5.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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