From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix nbtree high key "continuescan" row compare bug.
Date: Mon, 01 Apr 2019 00:27:29 +0000
Message-ID: <E1hAknR-0000PU-Tu@gemulon.postgresql.org> (raw)
Fix nbtree high key "continuescan" row compare bug.
Commit 29b64d1d mishandled skipping over truncated high key attributes
during row comparisons. The row comparison key matching loop would loop
forever when a truncated attribute was encountered for a row compare
subkey. Fix by following the example of other code in the loop: advance
the current subkey, or break out of the loop when the last subkey is
reached.
Add test coverage for the relevant _bt_check_rowcompare() code path.
The new test case is somewhat tied to nbtree implementation details,
which isn't ideal, but seems unavoidable.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/76a39f2295ecb040f2ea052320941e1eb9b526c0
Modified Files
--------------
src/backend/access/nbtree/nbtutils.c | 3 +++
src/test/regress/expected/index_including.out | 21 ++++++++++++++++++++-
src/test/regress/sql/index_including.sql | 8 +++++++-
3 files changed, 30 insertions(+), 2 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: pg@bowt.ie
Subject: Re: pgsql: Fix nbtree high key "continuescan" row compare bug.
In-Reply-To: <E1hAknR-0000PU-Tu@gemulon.postgresql.org>
References: <E1hAknR-0000PU-Tu@gemulon.postgresql.org>
* 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