!255 Removed enable_checkpoint and enable_redo_log from mot.conf

Merge pull request !255 from Vinoth Veeraraghavan/master
This commit is contained in:
opengauss-bot
2020-09-28 08:05:58 +08:00
committed by Gitee
2 changed files with 16 additions and 10 deletions

View File

@ -40,13 +40,10 @@
# REDO LOG
#------------------------------------------------------------------------------
# Specifies whether to use redo-log for durability.
#
#enable_redo_log = true
# Specifies whether to use group commit.
# This option is relevant only when openGauss is configured to use synchronous commit (i.e. when
# postgresql.conf has synchronous_commit configured to any value other than 'off').
#
#enable_group_commit = false
# Defines the group size and timeout when group commit is enabled.
@ -58,7 +55,7 @@
#group_commit_size = 16
#group_commit_timeout = 10 ms
# Specifies the number of redo log buffers to use for asynchronous commit mode.
# Specifies the number of redo-log buffers to use for asynchronous commit mode.
# Allowed range of values for this configuration is [8, 128]. The size of one buffer is 128 MB.
# This option is relevant only when openGauss is configured to use asynchronous commit (i.e. when
# postgresql.conf has synchronous_commit configured to 'off').
@ -69,10 +66,6 @@
# CHECKPOINT
#------------------------------------------------------------------------------
# Specifies whether to use periodic checkpoint.
#
#enable_checkpoint = true
# Specifies the directory in which checkpoint data is to be stored.
# The default location is in the data folder of each data node.
#
@ -122,7 +115,7 @@
# Configures the sections included in the periodic statistics reports. If none is configured then
# the statistics report is suppressed.
# The log recovery statistics contains various redo log recovery metrics.
# The log recovery statistics contains various redo-log recovery metrics.
# The DB session statistics contains transaction events such commits, rollback etc.
# The network statistics contains connection/disconnection events.
# The log statistics contains details regarding redo-log.
@ -172,6 +165,11 @@
# Specifies whether to use NUMA-aware memory allocation.
# When disabled, all affinity configurations are disabled as well.
# MOT engine assumes that all the available NUMA nodes have memory. If the machine has some
# special configuration in which some of the NUMA nodes have no memory, then the MOT engine
# initialization and hence the database server startup will fail. In such machines, it is
# recommended that this configuration value be set to false, in order to prevent startup
# failures and let the MOT engine to function normally without using NUMA-aware memory allocation.
#
#enable_numa = true

View File

@ -715,6 +715,14 @@ void MOTConfiguration::LoadConfig()
// Checkpoint configuration
UPDATE_BOOL_CFG(m_enableCheckpoint, "enable_checkpoint", DEFAULT_ENABLE_CHECKPOINT);
if (!m_enableCheckpoint && m_enableRedoLog) {
if (m_suppressLog == 0) {
MOT_LOG_WARN("Disabling redo_log forcibly as the checkpoint is disabled");
}
UpdateBoolConfigItem(m_enableRedoLog, false, "enable_redo_log");
}
UPDATE_STRING_CFG(m_checkpointDir, "checkpoint_dir", DEFAULT_CHECKPOINT_DIR);
UPDATE_ABS_MEM_CFG(m_checkpointSegThreshold,
"checkpoint_segsize",