diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 5575df516027769d72cd0973946eeca443358353..8f9f61d157633d19349f0026ca4e1ca16b0b0cfd 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1957,10 +1957,10 @@ include 'filename' </listitem> </varlistentry> - <varlistentry id="guc-wal-log-hintbits" xreflabel="wal_log_hintbits"> - <term><varname>wal_log_hintbits</varname> (<type>boolean</type>)</term> + <varlistentry id="guc-wal-log-hints" xreflabel="wal_log_hints"> + <term><varname>wal_log_hints</varname> (<type>boolean</type>)</term> <indexterm> - <primary><varname>wal_log_hintbits</> configuration parameter</primary> + <primary><varname>wal_log_hints</> configuration parameter</primary> </indexterm> <listitem> <para> diff --git a/src/backend/access/heap/visibilitymap.c b/src/backend/access/heap/visibilitymap.c index 60ee76a208133f55b419f8e0993836bcf89e0540..379ee1ce19e1907a5cf064025040eeaea95ff218 100644 --- a/src/backend/access/heap/visibilitymap.c +++ b/src/backend/access/heap/visibilitymap.c @@ -287,7 +287,7 @@ visibilitymap_set(Relation rel, BlockNumber heapBlk, Buffer heapBuf, cutoff_xid); /* - * If data checksums are enabled (or wal_log_hintbits=on), we + * If data checksums are enabled (or wal_log_hints=on), we * need to protect the heap page from being torn. */ if (XLogHintBitIsNeeded()) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 56da16a578884c95e2d845c62254e674420b11a2..1277e71071cb3eded2ab6800c7cb971d694bd818 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -79,7 +79,7 @@ bool XLogArchiveMode = false; char *XLogArchiveCommand = NULL; bool EnableHotStandby = false; bool fullPageWrites = true; -bool walLogHintbits = false; +bool walLogHints = false; bool log_checkpoints = false; int sync_method = DEFAULT_SYNC_METHOD; int wal_level = WAL_LEVEL_MINIMAL; @@ -5271,7 +5271,7 @@ BootStrapXLOG(void) ControlFile->max_prepared_xacts = max_prepared_xacts; ControlFile->max_locks_per_xact = max_locks_per_xact; ControlFile->wal_level = wal_level; - ControlFile->wal_log_hintbits = walLogHintbits; + ControlFile->wal_log_hints = walLogHints; ControlFile->data_checksum_version = bootstrap_data_checksum_version; /* some additional ControlFile fields are set in WriteControlFile() */ @@ -9060,7 +9060,7 @@ static void XLogReportParameters(void) { if (wal_level != ControlFile->wal_level || - walLogHintbits != ControlFile->wal_log_hintbits || + walLogHints != ControlFile->wal_log_hints || MaxConnections != ControlFile->MaxConnections || max_worker_processes != ControlFile->max_worker_processes || max_prepared_xacts != ControlFile->max_prepared_xacts || @@ -9083,7 +9083,7 @@ XLogReportParameters(void) xlrec.max_prepared_xacts = max_prepared_xacts; xlrec.max_locks_per_xact = max_locks_per_xact; xlrec.wal_level = wal_level; - xlrec.wal_log_hintbits = walLogHintbits; + xlrec.wal_log_hints = walLogHints; rdata.buffer = InvalidBuffer; rdata.data = (char *) &xlrec; @@ -9098,7 +9098,7 @@ XLogReportParameters(void) ControlFile->max_prepared_xacts = max_prepared_xacts; ControlFile->max_locks_per_xact = max_locks_per_xact; ControlFile->wal_level = wal_level; - ControlFile->wal_log_hintbits = walLogHintbits; + ControlFile->wal_log_hints = walLogHints; UpdateControlFile(); } } @@ -9485,7 +9485,7 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record) ControlFile->max_prepared_xacts = xlrec.max_prepared_xacts; ControlFile->max_locks_per_xact = xlrec.max_locks_per_xact; ControlFile->wal_level = xlrec.wal_level; - ControlFile->wal_log_hintbits = walLogHintbits; + ControlFile->wal_log_hints = walLogHints; /* * Update minRecoveryPoint to ensure that if recovery is aborted, we diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 51416f49cd9b2e3b6fdbd6ac9a464ae30bc93470..a605363039e40c88414f304e6491466449732aee 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -872,11 +872,11 @@ static struct config_bool ConfigureNamesBool[] = }, { - {"wal_log_hintbits", PGC_POSTMASTER, WAL_SETTINGS, + {"wal_log_hints", PGC_POSTMASTER, WAL_SETTINGS, gettext_noop("Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modifications"), NULL }, - &walLogHintbits, + &walLogHints, false, NULL, NULL, NULL }, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index d049159444f481815be4ac180e649ea5eae31696..27791cc40ec46a6cb22696da200cd8f77d405f52 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -184,7 +184,7 @@ # fsync_writethrough # open_sync #full_page_writes = on # recover from partial page writes -#wal_log_hintbits = off # also do full pages writes of non-critical updates +#wal_log_hints = off # also do full pages writes of non-critical updates #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers # (change requires restart) #wal_writer_delay = 200ms # 1-10000 milliseconds diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c index da48e98ff99282236f83b36ed0a7ecbff19f32fe..ea96fe146176244bf5a0159f76534c7f33f5b001 100644 --- a/src/bin/pg_controldata/pg_controldata.c +++ b/src/bin/pg_controldata/pg_controldata.c @@ -260,8 +260,8 @@ main(int argc, char *argv[]) ControlFile.backupEndRequired ? _("yes") : _("no")); printf(_("Current wal_level setting: %s\n"), wal_level_str(ControlFile.wal_level)); - printf(_("Current wal_log_hintbits setting: %s\n"), - ControlFile.wal_log_hintbits ? _("on") : _("off")); + printf(_("Current wal_log_hints setting: %s\n"), + ControlFile.wal_log_hints ? _("on") : _("off")); printf(_("Current max_connections setting: %d\n"), ControlFile.MaxConnections); printf(_("Current max_worker_processes setting: %d\n"), diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c index da13ff4d134b7c185b3c62af6cc6eeec9f2ab31e..a6be80e205eb048a78e41ee451956089c44c58c7 100644 --- a/src/bin/pg_resetxlog/pg_resetxlog.c +++ b/src/bin/pg_resetxlog/pg_resetxlog.c @@ -525,7 +525,7 @@ GuessControlValues(void) /* minRecoveryPoint, backupStartPoint and backupEndPoint can be left zero */ ControlFile.wal_level = WAL_LEVEL_MINIMAL; - ControlFile.wal_log_hintbits = false; + ControlFile.wal_log_hints = false; ControlFile.MaxConnections = 100; ControlFile.max_worker_processes = 8; ControlFile.max_prepared_xacts = 0; @@ -722,7 +722,7 @@ RewriteControlFile(void) * anyway at startup. */ ControlFile.wal_level = WAL_LEVEL_MINIMAL; - ControlFile.wal_log_hintbits = false; + ControlFile.wal_log_hints = false; ControlFile.MaxConnections = 100; ControlFile.max_worker_processes = 8; ControlFile.max_prepared_xacts = 0; diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index e69accd4b2e010fce8376fe31729d13d8b0f04ee..954486a9130f990f9419bc3bff3a6cb58cb8dc2e 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -189,7 +189,7 @@ extern bool XLogArchiveMode; extern char *XLogArchiveCommand; extern bool EnableHotStandby; extern bool fullPageWrites; -extern bool walLogHintbits; +extern bool walLogHints; extern bool log_checkpoints; extern int num_xloginsert_slots; @@ -219,9 +219,9 @@ extern int wal_level; * we have to protect them against torn page writes. When you only set * individual bits on a page, it's still consistent no matter what combination * of the bits make it to disk, but the checksum wouldn't match. Also WAL-log - * them if forced by wal_log_hintbits=on. + * them if forced by wal_log_hints=on. */ -#define XLogHintBitIsNeeded() (DataChecksumsEnabled() || walLogHintbits) +#define XLogHintBitIsNeeded() (DataChecksumsEnabled() || walLogHints) /* Do we need to WAL-log information required only for Hot Standby and logical replication? */ #define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_HOT_STANDBY) diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h index d0022b375160689d2354bbc8bed210c8de6e0e3d..c301d5e5d65b8d5bcda90b45a394add8e26d05d8 100644 --- a/src/include/access/xlog_internal.h +++ b/src/include/access/xlog_internal.h @@ -209,7 +209,7 @@ typedef struct xl_parameter_change int max_prepared_xacts; int max_locks_per_xact; int wal_level; - bool wal_log_hintbits; + bool wal_log_hints; } xl_parameter_change; /* logs restore point */ diff --git a/src/include/catalog/pg_control.h b/src/include/catalog/pg_control.h index 8f23508ad0f16a6dd2bc337cbe18eef2b0836efc..4dec341152ab9f1316a707a07ad3290d43ff153e 100644 --- a/src/include/catalog/pg_control.h +++ b/src/include/catalog/pg_control.h @@ -171,7 +171,7 @@ typedef struct ControlFileData * or hot standby. */ int wal_level; - bool wal_log_hintbits; + bool wal_log_hints; int MaxConnections; int max_worker_processes; int max_prepared_xacts;