*** a/src/backend/access/rmgrdesc/xlogdesc.c --- b/src/backend/access/rmgrdesc/xlogdesc.c *************** *** 28,33 **** const struct config_enum_entry wal_level_options[] = { --- 28,34 ---- {"minimal", WAL_LEVEL_MINIMAL, false}, {"archive", WAL_LEVEL_ARCHIVE, false}, {"hot_standby", WAL_LEVEL_HOT_STANDBY, false}, + {"all", WAL_LEVEL_ALL, false}, {NULL, 0, false} }; *** a/src/backend/storage/buffer/bufmgr.c --- b/src/backend/storage/buffer/bufmgr.c *************** *** 2635,2641 **** MarkBufferDirtyHint(Buffer buffer, bool buffer_std) * We don't check full_page_writes here because that logic is included * when we call XLogInsert() since the value changes dynamically. */ ! if (DataChecksumsEnabled() && (bufHdr->flags & BM_PERMANENT)) { /* * If we're in recovery we cannot dirty a page because of a hint. --- 2635,2641 ---- * We don't check full_page_writes here because that logic is included * when we call XLogInsert() since the value changes dynamically. */ ! if ((DataChecksumsEnabled() || XLogAllXLogIsNeeded()) && (bufHdr->flags & BM_PERMANENT)) { /* * If we're in recovery we cannot dirty a page because of a hint. *** a/src/bin/pg_controldata/pg_controldata.c --- b/src/bin/pg_controldata/pg_controldata.c *************** *** 77,82 **** wal_level_str(WalLevel wal_level) --- 77,84 ---- return "archive"; case WAL_LEVEL_HOT_STANDBY: return "hot_standby"; + case WAL_LEVEL_ALL: + return "all"; } return _("unrecognized wal_level"); } *** a/src/include/access/xlog.h --- b/src/include/access/xlog.h *************** *** 197,203 **** typedef enum WalLevel { WAL_LEVEL_MINIMAL = 0, WAL_LEVEL_ARCHIVE, ! WAL_LEVEL_HOT_STANDBY } WalLevel; extern int wal_level; --- 197,204 ---- { WAL_LEVEL_MINIMAL = 0, WAL_LEVEL_ARCHIVE, ! WAL_LEVEL_HOT_STANDBY, ! WAL_LEVEL_ALL } WalLevel; extern int wal_level; *************** *** 213,218 **** extern int wal_level; --- 214,222 ---- /* Do we need to WAL-log information required only for Hot Standby? */ #define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_HOT_STANDBY) + /* Do we need to WAL-log also when updating hint bit? */ + #define XLogAllXLogIsNeeded() (wal_level >= WAL_LEVEL_ALL) + #ifdef WAL_DEBUG extern bool XLOG_DEBUG; #endif