Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
961bf59f
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
961bf59f
编写于
12月 21, 2013
作者:
F
Fujii Masao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename wal_log_hintbits to wal_log_hints, per discussion on pgsql-hackers.
Sawada Masahiko
上级
6130208e
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
22 addition
and
22 deletion
+22
-22
doc/src/sgml/config.sgml
doc/src/sgml/config.sgml
+3
-3
src/backend/access/heap/visibilitymap.c
src/backend/access/heap/visibilitymap.c
+1
-1
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+6
-6
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc.c
+2
-2
src/backend/utils/misc/postgresql.conf.sample
src/backend/utils/misc/postgresql.conf.sample
+1
-1
src/bin/pg_controldata/pg_controldata.c
src/bin/pg_controldata/pg_controldata.c
+2
-2
src/bin/pg_resetxlog/pg_resetxlog.c
src/bin/pg_resetxlog/pg_resetxlog.c
+2
-2
src/include/access/xlog.h
src/include/access/xlog.h
+3
-3
src/include/access/xlog_internal.h
src/include/access/xlog_internal.h
+1
-1
src/include/catalog/pg_control.h
src/include/catalog/pg_control.h
+1
-1
未找到文件。
doc/src/sgml/config.sgml
浏览文件 @
961bf59f
...
...
@@ -1957,10 +1957,10 @@ include 'filename'
</listitem>
</varlistentry>
<varlistentry id="guc-wal-log-hint
bits" xreflabel="wal_log_hintbi
ts">
<term><varname>wal_log_hint
bit
s</varname> (<type>boolean</type>)</term>
<varlistentry id="guc-wal-log-hint
s" xreflabel="wal_log_hin
ts">
<term><varname>wal_log_hints</varname> (<type>boolean</type>)</term>
<indexterm>
<primary><varname>wal_log_hint
bit
s</> configuration parameter</primary>
<primary><varname>wal_log_hints</> configuration parameter</primary>
</indexterm>
<listitem>
<para>
...
...
src/backend/access/heap/visibilitymap.c
浏览文件 @
961bf59f
...
...
@@ -287,7 +287,7 @@ visibilitymap_set(Relation rel, BlockNumber heapBlk, Buffer heapBuf,
cutoff_xid
);
/*
* If data checksums are enabled (or wal_log_hint
bit
s=on), we
* If data checksums are enabled (or wal_log_hints=on), we
* need to protect the heap page from being torn.
*/
if
(
XLogHintBitIsNeeded
())
...
...
src/backend/access/transam/xlog.c
浏览文件 @
961bf59f
...
...
@@ -79,7 +79,7 @@ bool XLogArchiveMode = false;
char
*
XLogArchiveCommand
=
NULL
;
bool
EnableHotStandby
=
false
;
bool
fullPageWrites
=
true
;
bool
walLogHint
bit
s
=
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_hint
bits
=
walLogHintbi
ts
;
ControlFile
->
wal_log_hint
s
=
walLogHin
ts
;
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
||
walLogHint
bits
!=
ControlFile
->
wal_log_hintbi
ts
||
walLogHint
s
!=
ControlFile
->
wal_log_hin
ts
||
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_hint
bits
=
walLogHintbi
ts
;
xlrec
.
wal_log_hint
s
=
walLogHin
ts
;
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_hint
bits
=
walLogHintbi
ts
;
ControlFile
->
wal_log_hint
s
=
walLogHin
ts
;
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_hint
bits
=
walLogHintbi
ts
;
ControlFile
->
wal_log_hint
s
=
walLogHin
ts
;
/*
* Update minRecoveryPoint to ensure that if recovery is aborted, we
...
...
src/backend/utils/misc/guc.c
浏览文件 @
961bf59f
...
...
@@ -872,11 +872,11 @@ static struct config_bool ConfigureNamesBool[] =
},
{
{
"wal_log_hint
bit
s"
,
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
},
&
walLogHint
bit
s
,
&
walLogHints
,
false
,
NULL
,
NULL
,
NULL
},
...
...
src/backend/utils/misc/postgresql.conf.sample
浏览文件 @
961bf59f
...
...
@@ -184,7 +184,7 @@
# fsync_writethrough
# open_sync
#full_page_writes = on # recover from partial page writes
#wal_log_hint
bit
s = 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
...
...
src/bin/pg_controldata/pg_controldata.c
浏览文件 @
961bf59f
...
...
@@ -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_hint
bits setting:
%s
\n
"
),
ControlFile
.
wal_log_hint
bit
s
?
_
(
"on"
)
:
_
(
"off"
));
printf
(
_
(
"Current wal_log_hint
s 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
"
),
...
...
src/bin/pg_resetxlog/pg_resetxlog.c
浏览文件 @
961bf59f
...
...
@@ -525,7 +525,7 @@ GuessControlValues(void)
/* minRecoveryPoint, backupStartPoint and backupEndPoint can be left zero */
ControlFile
.
wal_level
=
WAL_LEVEL_MINIMAL
;
ControlFile
.
wal_log_hint
bit
s
=
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_hint
bit
s
=
false
;
ControlFile
.
wal_log_hints
=
false
;
ControlFile
.
MaxConnections
=
100
;
ControlFile
.
max_worker_processes
=
8
;
ControlFile
.
max_prepared_xacts
=
0
;
...
...
src/include/access/xlog.h
浏览文件 @
961bf59f
...
...
@@ -189,7 +189,7 @@ extern bool XLogArchiveMode;
extern
char
*
XLogArchiveCommand
;
extern
bool
EnableHotStandby
;
extern
bool
fullPageWrites
;
extern
bool
walLogHint
bit
s
;
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_hint
bit
s=on.
* them if forced by wal_log_hints=on.
*/
#define XLogHintBitIsNeeded() (DataChecksumsEnabled() || walLogHint
bit
s)
#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)
...
...
src/include/access/xlog_internal.h
浏览文件 @
961bf59f
...
...
@@ -209,7 +209,7 @@ typedef struct xl_parameter_change
int
max_prepared_xacts
;
int
max_locks_per_xact
;
int
wal_level
;
bool
wal_log_hint
bit
s
;
bool
wal_log_hints
;
}
xl_parameter_change
;
/* logs restore point */
...
...
src/include/catalog/pg_control.h
浏览文件 @
961bf59f
...
...
@@ -171,7 +171,7 @@ typedef struct ControlFileData
* or hot standby.
*/
int
wal_level
;
bool
wal_log_hint
bit
s
;
bool
wal_log_hints
;
int
MaxConnections
;
int
max_worker_processes
;
int
max_prepared_xacts
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录