aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2019-05-14 13:06:33 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2019-05-14 13:06:33 +0300
commit3293330f79af9d66e9df251266c882794edfec4e (patch)
tree2b759e1f19998e4fb3e9398bd0e0225010335235 /src
parent6bbc2f9b66104de67f29881c54e75fd6f5d2f694 (diff)
downloadpostgresql-3293330f79af9d66e9df251266c882794edfec4e.tar.gz
postgresql-3293330f79af9d66e9df251266c882794edfec4e.zip
Fix comment on when HOT update is possible.
The conditions listed in this comment have changed several times, and at some point the thing that the "if so" referred to was negated. The text was OK up to 9.6. It was differently wrong in v10, v11 and master, so fix in all those versions.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/heap/heapam.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 07e9d24013d..698d08d1d39 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -4217,11 +4217,10 @@ l2:
{
/*
* Since the new tuple is going into the same page, we might be able
- * to do a HOT update. Check if any of the index columns have been
- * changed, or if we have projection functional indexes, check whether
- * the old and the new values are the same. If the page was already
- * full, we may have skipped checking for index columns. If so, HOT
- * update is possible.
+ * to do a HOT update. A HOT update is possible if none of the index
+ * columns, nor columns used in projection functional indexes, have
+ * changed. If the page was already full, we may have skipped
+ * checking for index columns, and also can't do a HOT update.
*/
if (hot_attrs_checked
&& !bms_overlap(modified_attrs, hot_attrs)