From: Kevin Grittner <kgrittn@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix interaction between CREATE INDEX and "snapshot too old".
Date: Fri, 10 Jun 2016 14:35:51 +0000
Message-ID: <E1bBNXL-0007oE-JW@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fix interaction between CREATE INDEX and "snapshot too old".
Since indexes are created without valid LSNs, an index created
while a snapshot older than old_snapshot_threshold existed could
cause queries to return incorrect results when those old snapshots
were used, if any relevant rows had been subject to early pruning
before the index was built. Prevent usage of a newly created index
until all such snapshots are released, for relations where this can
happen.
Questions about the interaction of "snapshot too old" with index
creation were initially raised by Andres Freund.
Reviewed by Robert Haas.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/bf9a60ee3349a2f2dc5fe6d571a8d39cfc634371
Modified Files
--------------
src/backend/catalog/index.c | 28 +++++++++++++++++++++-------
src/backend/storage/buffer/bufmgr.c | 3 +--
src/backend/utils/time/snapmgr.c | 5 +----
src/include/utils/snapmgr.h | 13 +++++++++++++
4 files changed, 36 insertions(+), 13 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: kgrittn@postgresql.org
Subject: Re: pgsql: Fix interaction between CREATE INDEX and "snapshot too old".
In-Reply-To: <E1bBNXL-0007oE-JW@gemulon.postgresql.org>
References: <E1bBNXL-0007oE-JW@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