From d191629fc66ac6ab64e80d96d7f0b9aba9743696 Mon Sep 17 00:00:00 2001 From: ashu Date: Fri, 17 Mar 2017 11:50:47 +0530 Subject: [PATCH] Allow WAL consistency tool to mask LH_PAGE_HAS_DEAD_TUPLES flag Patch by Ashutosh Sharma --- src/backend/access/hash/hash_xlog.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backend/access/hash/hash_xlog.c b/src/backend/access/hash/hash_xlog.c index ac82092..de7522e 100644 --- a/src/backend/access/hash/hash_xlog.c +++ b/src/backend/access/hash/hash_xlog.c @@ -1250,8 +1250,14 @@ hash_mask(char *pagedata, BlockNumber blkno) /* * In hash bucket and overflow pages, it is possible to modify the * LP_FLAGS without emitting any WAL record. Hence, mask the line - * pointer flags. See hashgettuple() for details. + * pointer flags. See hashgettuple(), _hash_kill_items() for details. */ mask_lp_flags(page); } + + /* + * It is possible that the hint bit LH_PAGE_HAS_DEAD_TUPLES may remain + * unlogged. So, mask it. See _hash_kill_items() for details. + */ + opaque->hasho_flag &= ~LH_PAGE_HAS_DEAD_TUPLES; } -- 1.8.3.1