pgsql: Reset the binary heap in MergeAppend rescans. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Reset the binary heap in MergeAppend rescans.
Date
Msg-id E1VFXvH-0002Gn-10@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Reset the binary heap in MergeAppend rescans.

Failing to do so can cause queries to return wrong data, error out or crash.
This requires adding a new binaryheap_reset() method to binaryheap.c,
but that probably should have been there anyway.

Per bug #8410 from Terje Elde.  Diagnosis and patch by Andres Freund.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/16e8e36cebba8909ec01ca259f32e8dd40090657

Modified Files
--------------
src/backend/executor/nodeMergeAppend.c |    1 +
src/backend/lib/binaryheap.c           |   20 +++++++++++++++++---
src/include/lib/binaryheap.h           |    1 +
3 files changed, 19 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Reset the binary heap in MergeAppend rescans.
Next
From: Tom Lane
Date:
Subject: pgsql: Add test case for bug #8410.