From: Kevin Grittner <kgrittn@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix hash index vs "snapshot too old" problemms
Date: Fri, 06 May 2016 12:59:30 +0000
Message-ID: <E1ayfLu-0003zJ-I0@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fix hash index vs "snapshot too old" problemms
Hash indexes are not WAL-logged, and so do not maintain the LSN of
index pages. Since the "snapshot too old" feature counts on
detecting error conditions using the LSN of a table and all indexes
on it, this makes it impossible to safely do early vacuuming on any
table with a hash index, so add this to the tests for whether the
xid used to vacuum a table can be adjusted based on
old_snapshot_threshold.
While at it, add a paragraph to the docs for old_snapshot_threshold
which specifically mentions this and other aspects of the feature
which may otherwise surprise users.
Problem reported and patch reviewed by Amit Kapila
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/2cc41acd8fa3ebb8f0501c6102a253fb7053cf46
Modified Files
--------------
doc/src/sgml/config.sgml | 13 ++++++++++
src/backend/access/hash/hash.c | 1 -
src/backend/access/hash/hashsearch.c | 4 ----
src/backend/utils/cache/relcache.c | 46 ++++++++++++++++++++++++++++++++++++
src/backend/utils/time/snapmgr.c | 3 ++-
src/include/utils/rel.h | 1 +
6 files changed, 62 insertions(+), 6 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 hash index vs "snapshot too old" problemms
In-Reply-To: <E1ayfLu-0003zJ-I0@gemulon.postgresql.org>
References: <E1ayfLu-0003zJ-I0@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