aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorKevin Grittner <kgrittn@postgresql.org>2016-05-06 07:47:12 -0500
committerKevin Grittner <kgrittn@postgresql.org>2016-05-06 07:47:12 -0500
commit2cc41acd8fa3ebb8f0501c6102a253fb7053cf46 (patch)
treeda067fb39fbe366b6f15746173050582e2b8f56c /src/include
parent9b66aa006f81b2705337ca223daeeabf4db6453a (diff)
downloadpostgresql-2cc41acd8fa3ebb8f0501c6102a253fb7053cf46.tar.gz
postgresql-2cc41acd8fa3ebb8f0501c6102a253fb7053cf46.zip
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/rel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index b5d82d60042..a0ba4177645 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -505,5 +505,6 @@ typedef struct ViewOptions
/* routines in utils/cache/relcache.c */
extern void RelationIncrementReferenceCount(Relation rel);
extern void RelationDecrementReferenceCount(Relation rel);
+extern bool RelationHasUnloggedIndex(Relation rel);
#endif /* REL_H */