From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Avoid early reuse of btree pages, causing incorrect query result |
Date: | 2012-06-01 12:00:40 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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
Modified Files
--------------
src/backend/access/nbtree/README | 10 ++++++----
src/backend/access/nbtree/nbtpage.c | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-06-01 13:29:17 | Re: Re: [COMMITTERS] pgsql: Checkpointer starts before bgwriter to avoid missing fsync reque |
Previous Message | Simon Riggs | 2012-06-01 11:47:56 | pgsql: Avoid early reuse of btree pages, causing incorrect query result |