diff --git a/src/backend/access/heap/heapam_xlog.c b/src/backend/access/heap/heapam_xlog.c index 11cb3f74da5..a09fb4b803a 100644 --- a/src/backend/access/heap/heapam_xlog.c +++ b/src/backend/access/heap/heapam_xlog.c @@ -157,6 +157,12 @@ heap_xlog_prune_freeze(XLogReaderState *record) /* There should be no more data */ Assert((char *) frz_offsets == dataptr + datalen); + /* + * The critical integrity requirement here is that we must never end + * up with the visibility map bit set and the page-level + * PD_ALL_VISIBLE bit unset. If that were to occur, a subsequent page + * modification would fail to clear the visibility map bit. + */ if (vmflags & VISIBILITYMAP_VALID_BITS) PageSetAllVisible(page);