From b62a5c1aecd37251d621a3d6d927d869fb4a89d8 Mon Sep 17 00:00:00 2001 From: Alexey Kondratov Date: Tue, 17 May 2022 18:33:34 +0300 Subject: [PATCH] Do not force FPI if data checksums are enabled --- src/include/access/xlog.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index 66fe9dfcd9e..f2e60f3afcf 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -208,7 +208,12 @@ extern PGDLLIMPORT int wal_level; * of the bits make it to disk, but the checksum wouldn't match. Also WAL-log * them if forced by wal_log_hints=on. */ -#define XLogHintBitIsNeeded() (DataChecksumsEnabled() || wal_log_hints) +/* + * NEON: don't force FPI if checksums are enabled. As mentioned above it was + * done to protect from torn pages, but we don't seem to have this problem + * in Neon as all pages arrive to pageserver via WAL. + */ +#define XLogHintBitIsNeeded() (wal_log_hints) /* Do we need to WAL-log information required only for Hot Standby and logical replication? */ #define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_REPLICA)