Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
bb892cec
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,发现更多精彩内容 >>
提交
bb892cec
编写于
8月 04, 2004
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tweak postmaster code to avoid double reporting when bgwriter crashes.
上级
5cc38649
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
19 deletion
+13
-19
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+13
-19
未找到文件。
src/backend/postmaster/postmaster.c
浏览文件 @
bb892cec
...
...
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.41
8 2004/08/01 17:45:43
tgl Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.41
9 2004/08/04 20:09:47
tgl Exp $
*
* NOTES
*
...
...
@@ -248,8 +248,8 @@ static void pmdie(SIGNAL_ARGS);
static
void
reaper
(
SIGNAL_ARGS
);
static
void
sigusr1_handler
(
SIGNAL_ARGS
);
static
void
dummy_handler
(
SIGNAL_ARGS
);
static
void
Cleanup
Proc
(
int
pid
,
int
exitstatus
);
static
void
HandleChildCrash
(
int
pid
,
int
exitstatus
);
static
void
Cleanup
Backend
(
int
pid
,
int
exitstatus
);
static
void
HandleChildCrash
(
int
pid
,
int
exitstatus
,
const
char
*
procname
);
static
void
LogChildExit
(
int
lev
,
const
char
*
procname
,
int
pid
,
int
exitstatus
);
static
int
BackendRun
(
Port
*
port
);
...
...
@@ -1947,7 +1947,7 @@ reaper(SIGNAL_ARGS)
while
((
pid
=
win32_waitpid
(
&
exitstatus
))
>
0
)
{
/*
* We need to do this here, and not in Cleanup
Proc
, since this is
* We need to do this here, and not in Cleanup
Backend
, since this is
* to be called on all children when we are done with them. Could
* move to LogChildExit, but that seems like asking for future
* trouble...
...
...
@@ -2025,9 +2025,8 @@ reaper(SIGNAL_ARGS)
/*
* Any unexpected exit of the bgwriter is treated as a crash.
*/
LogChildExit
(
LOG
,
gettext
(
"background writer process"
),
pid
,
exitstatus
);
HandleChildCrash
(
pid
,
exitstatus
);
HandleChildCrash
(
pid
,
exitstatus
,
gettext
(
"background writer process"
));
continue
;
}
...
...
@@ -2067,7 +2066,7 @@ reaper(SIGNAL_ARGS)
/*
* Else do standard backend child cleanup.
*/
Cleanup
Proc
(
pid
,
exitstatus
);
Cleanup
Backend
(
pid
,
exitstatus
);
}
/* loop over pending child-death reports */
if
(
FatalError
)
...
...
@@ -2116,13 +2115,13 @@ reaper_done:
/*
* Cleanup
Proc
-- cleanup after terminated backend.
* Cleanup
Backend
-- cleanup after terminated backend.
*
* Remove all local state associated with backend.
*/
static
void
Cleanup
Proc
(
int
pid
,
int
exitstatus
)
/* child's exit status. */
Cleanup
Backend
(
int
pid
,
int
exitstatus
)
/* child's exit status. */
{
Dlelem
*
curr
;
...
...
@@ -2136,7 +2135,7 @@ CleanupProc(int pid,
*/
if
(
exitstatus
!=
0
)
{
HandleChildCrash
(
pid
,
exitstatus
);
HandleChildCrash
(
pid
,
exitstatus
,
gettext
(
"server process"
)
);
return
;
}
...
...
@@ -2166,8 +2165,7 @@ CleanupProc(int pid,
* process, and to signal all other remaining children to quickdie.
*/
static
void
HandleChildCrash
(
int
pid
,
int
exitstatus
)
/* child's exit status. */
HandleChildCrash
(
int
pid
,
int
exitstatus
,
const
char
*
procname
)
{
Dlelem
*
curr
,
*
next
;
...
...
@@ -2179,11 +2177,7 @@ HandleChildCrash(int pid,
*/
if
(
!
FatalError
)
{
LogChildExit
(
LOG
,
(
pid
==
BgWriterPID
)
?
gettext
(
"background writer process"
)
:
gettext
(
"server process"
),
pid
,
exitstatus
);
LogChildExit
(
LOG
,
procname
,
pid
,
exitstatus
);
ereport
(
LOG
,
(
errmsg
(
"terminating any other active server processes"
)));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录