| From: | Kevin Grittner <kgrittn(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Fix hash index vs "snapshot too old" problemms |
| Date: | 2016-05-06 12:59:30 |
| Message-ID: | E1ayfLu-0003zJ-I0@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2016-05-06 14:39:42 | pgsql: Docs: fix \crosstabview example. |
| Previous Message | Dean Rasheed | 2016-05-06 11:49:51 | pgsql: Move and rename fmtReloptionsArray(). |