pgsql: Fix btree mark/restore bug.

From: Kevin Grittner <kgrittn(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix btree mark/restore bug.
Date: 2016-06-02 17:25:06
Message-ID: E1b8WMk-00077E-Th@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix btree mark/restore bug.

Commit 2ed5b87f96d473962ec5230fd820abfeaccb2069 introduced a bug in
mark/restore, in an attempt to optimize repeated restores to the
same page. This caused an assertion failure during a merge join
which fed directly from an index scan, although the impact would
not be limited to that case. Revert the bad chunk of code from
that commit.

While investigating this bug it was discovered that a particular
"paranoia" set of the mark position field would not prevent bad
behavior; it would just make it harder to diagnose. Change that
into an assertion, which will draw attention to any future problem
in that area more directly.

Backpatch to 9.5, where the bug was introduced.

Bug #14169 reported by Shinta Koyanagi.
Preliminary analysis by Tom Lane identified which commit caused
the bug.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/236d569f92b298c697e0f54891418acfc8310003

Modified Files
--------------
src/backend/access/nbtree/nbtree.c | 19 -------------------
src/backend/access/nbtree/nbtsearch.c | 2 +-
2 files changed, 1 insertion(+), 20 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-06-02 17:28:32 pgsql: Redesign handling of SIGTERM/control-C in parallel pg_dump/pg_re
Previous Message Tom Lane 2016-06-01 20:14:44 pgsql: Clean up some minor inefficiencies in parallel dump/restore.