pgsql: Avoid early reuse of btree pages, causing incorrect query result - Mailing list pgsql-committers

From Simon Riggs
Subject pgsql: Avoid early reuse of btree pages, causing incorrect query result
Date
Msg-id E1SaQX2-0007L0-Gp@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Avoid early reuse of btree pages, causing incorrect query results.
When we allowed read-only transactions to skip assigning XIDs
we introduced the possibility that a fully deleted btree page
could be reused. This broke the index link sequence which could
then lead to indexscans silently returning fewer rows than would
have been correct. The actual incidence of silent errors from
this is thought to be very low because of the exact workload
required and locking pre-conditions. Fix is to remove pages only
if index page opaque->btpo.xact precedes RecentGlobalXmin.

Noah Misch, reviewed and backpatched by Simon Riggs

Branch
------
REL8_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/9ced0134a4b0e9bd76e978259edc3540c6669883

Modified Files
--------------
src/backend/access/nbtree/README    |   10 ++++++----
src/backend/access/nbtree/nbtpage.c |    2 +-
2 files changed, 7 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Simon Riggs
Date:
Subject: pgsql: Avoid early reuse of btree pages, causing incorrect query result
Next
From: Bruce Momjian
Date:
Subject: pgsql: In pg_upgrade, report pre-PG 8.1 plpython helper functions left