diff options
Diffstat (limited to 'src/backend/access/hash/hash_xlog.c')
-rw-r--r-- | src/backend/access/hash/hash_xlog.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/backend/access/hash/hash_xlog.c b/src/backend/access/hash/hash_xlog.c index 8647e8c6adc..ac82092ab24 100644 --- a/src/backend/access/hash/hash_xlog.c +++ b/src/backend/access/hash/hash_xlog.c @@ -859,6 +859,19 @@ hash_xlog_delete(XLogReaderState *record) PageIndexMultiDelete(page, unused, unend - unused); } + /* + * Mark the page as not containing any LP_DEAD items only if + * clear_dead_marking flag is set to true. See comments in + * hashbucketcleanup() for details. + */ + if (xldata->clear_dead_marking) + { + HashPageOpaque pageopaque; + + pageopaque = (HashPageOpaque) PageGetSpecialPointer(page); + pageopaque->hasho_flag &= ~LH_PAGE_HAS_DEAD_TUPLES; + } + PageSetLSN(page, lsn); MarkBufferDirty(deletebuf); } @@ -1078,6 +1091,7 @@ hash_xlog_vacuum_one_page(XLogReaderState *record) Buffer metabuf; Page page; XLogRedoAction action; + HashPageOpaque pageopaque; xldata = (xl_hash_vacuum_one_page *) XLogRecGetData(record); @@ -1126,6 +1140,13 @@ hash_xlog_vacuum_one_page(XLogReaderState *record) PageIndexMultiDelete(page, unused, unend - unused); } + /* + * Mark the page as not containing any LP_DEAD items. See comments + * in _hash_vacuum_one_page() for details. + */ + pageopaque = (HashPageOpaque) PageGetSpecialPointer(page); + pageopaque->hasho_flag &= ~LH_PAGE_HAS_DEAD_TUPLES; + PageSetLSN(page, lsn); MarkBufferDirty(buffer); } |