Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
2986aa6a
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,发现更多精彩内容 >>
提交
2986aa6a
编写于
11月 15, 2002
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add checkpoint_warning to warn of excessive checkpoints caused by too
few WAL files.
上级
3779f7fd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
52 addition
and
5 deletion
+52
-5
doc/src/sgml/runtime.sgml
doc/src/sgml/runtime.sgml
+13
-1
doc/src/sgml/wal.sgml
doc/src/sgml/wal.sgml
+11
-1
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+19
-1
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc.c
+6
-1
src/backend/utils/misc/postgresql.conf.sample
src/backend/utils/misc/postgresql.conf.sample
+1
-0
src/include/access/xlog.h
src/include/access/xlog.h
+2
-1
未找到文件。
doc/src/sgml/runtime.sgml
浏览文件 @
2986aa6a
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.15
4 2002/11/15 01:57:25
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.15
5 2002/11/15 02:44:50
momjian Exp $
-->
<Chapter Id="runtime">
...
...
@@ -2081,6 +2081,18 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
</listitem>
</varlistentry>
<variablelist>
<varlistentry>
<term><varname>CHECKPOINT_WARNING</varname> (<type>integer</type>)</term>
<listitem>
<para>
Send a message to the server logs if checkpoints caused by the
filling of checkpoint segment files happens more frequently than
this number of seconds. Zero turns off the warning.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>COMMIT_DELAY</varname> (<type>integer</type>)</term>
<listitem>
...
...
doc/src/sgml/wal.sgml
浏览文件 @
2986aa6a
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/wal.sgml,v 1.2
1 2002/11/02 22:23:01 tgl
Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/wal.sgml,v 1.2
2 2002/11/15 02:44:54 momjian
Exp $ -->
<chapter id="wal">
<title>Write-Ahead Logging (<acronym>WAL</acronym>)</title>
...
...
@@ -300,6 +300,16 @@
correspondingly increase shared memory usage.
</para>
<para>
Checkpoints are fairly expensive because they force all dirty kernel
buffers to disk using the operating system <literal>sync()</> call.
Busy servers may fill checkpoint segment files too quickly,
causing excessive checkpointing. If such forced checkpoints happen
more frequently than <varname>CHECKPOINT_WARNING</varname> seconds,
a message, will be output to the server logs recommending increasing
<varname>CHECKPOINT_SEGMENTS</varname>.
</para>
<para>
The <varname>COMMIT_DELAY</varname> parameter defines for how many
microseconds the backend will sleep after writing a commit
...
...
src/backend/postmaster/postmaster.c
浏览文件 @
2986aa6a
...
...
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.29
6 2002/11/15 01:57:26
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.29
7 2002/11/15 02:44:55
momjian Exp $
*
* NOTES
*
...
...
@@ -198,6 +198,8 @@ bool SilentMode = false; /* silent mode (-S) */
int
PreAuthDelay
=
0
;
int
AuthenticationTimeout
=
60
;
int
CheckPointTimeout
=
300
;
int
CheckPointWarning
=
30
;
time_t
LastSignalledCheckpoint
=
0
;
bool
log_hostname
;
/* for ps display */
bool
LogSourcePort
;
...
...
@@ -2329,6 +2331,22 @@ sigusr1_handler(SIGNAL_ARGS)
if
(
CheckPostmasterSignal
(
PMSIGNAL_DO_CHECKPOINT
))
{
if
(
CheckPointWarning
!=
0
)
{
/*
* This only times checkpoints forced by running out of
* segment files. Other checkpoints could reduce
* the frequency of forced checkpoints.
*/
time_t
now
=
time
(
NULL
);
if
(
now
-
LastSignalledCheckpoint
<
CheckPointWarning
)
elog
(
LOG
,
"Checkpoint segments are being created too frequently (%d secs)
\n
Consider increasing CHECKPOINT_SEGMENTS"
,
now
-
LastSignalledCheckpoint
);
LastSignalledCheckpoint
=
now
;
}
/*
* Request to schedule a checkpoint
*
...
...
src/backend/utils/misc/guc.c
浏览文件 @
2986aa6a
...
...
@@ -5,7 +5,7 @@
* command, configuration file, and command line options.
* See src/backend/utils/misc/README for more information.
*
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.10
5 2002/11/15 01:57:2
7 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.10
6 2002/11/15 02:44:5
7 momjian Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
...
...
@@ -660,6 +660,11 @@ static struct config_int
300
,
30
,
3600
,
NULL
,
NULL
},
{
{
"checkpoint_warning"
,
PGC_SIGHUP
},
&
CheckPointWarning
,
30
,
0
,
INT_MAX
,
NULL
,
NULL
},
{
{
"wal_buffers"
,
PGC_POSTMASTER
},
&
XLOGbuffers
,
8
,
4
,
INT_MAX
,
NULL
,
NULL
...
...
src/backend/utils/misc/postgresql.conf.sample
浏览文件 @
2986aa6a
...
...
@@ -65,6 +65,7 @@
#
#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each
#checkpoint_timeout = 300 # range 30-3600, in seconds
#checkpoint_warning = 30 # 0 is off, in seconds
#
#commit_delay = 0 # range 0-100000, in microseconds
#commit_siblings = 5 # range 1-1000
...
...
src/include/access/xlog.h
浏览文件 @
2986aa6a
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: xlog.h,v 1.
39 2002/09/26 22:58:34 tgl
Exp $
* $Id: xlog.h,v 1.
40 2002/11/15 02:44:57 momjian
Exp $
*/
#ifndef XLOG_H
#define XLOG_H
...
...
@@ -184,6 +184,7 @@ extern XLogRecPtr ProcLastRecEnd;
/* these variables are GUC parameters related to XLOG */
extern
int
CheckPointSegments
;
extern
int
CheckPointWarning
;
extern
int
XLOGbuffers
;
extern
int
XLOG_DEBUG
;
extern
char
*
XLOG_sync_method
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录