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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in abbreviated keys abort handling (found with amcheck)
Date: 2016-08-22 19:34:23
Message-ID: CA+TgmoaafJc6oLzy4H0zr1C+tb8VrVTsQfJh2BFQzS9=2GdDnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 19, 2016 at 6:07 PM, Peter Geoghegan <pg(at)heroku(dot)com> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-08-22 20:20:58 Re: Changed SRF in targetlist handling
Previous Message Andres Freund 2016-08-22 19:01:01 Re: Changed SRF in targetlist handling