Skip to content

Commit

Permalink
Do not force FPI if data checksums are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ololobus committed May 17, 2022
1 parent 6744950 commit 2767bab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/include/access/xlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2767bab

Please sign in to comment.