Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
8b06e6ab
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,发现更多精彩内容 >>
提交
8b06e6ab
编写于
5月 06, 2013
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert idea of zer-padding padding session id in log_line_prefix
Removal of doc adjustment and release note mention as well.
上级
539ecc92
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
13 deletion
+5
-13
doc/src/sgml/config.sgml
doc/src/sgml/config.sgml
+3
-3
doc/src/sgml/release-9.3.sgml
doc/src/sgml/release-9.3.sgml
+0
-8
src/backend/utils/error/elog.c
src/backend/utils/error/elog.c
+2
-2
未找到文件。
doc/src/sgml/config.sgml
浏览文件 @
8b06e6ab
...
...
@@ -4089,14 +4089,14 @@ local0.* /var/log/postgresql
</informaltable>
The <literal>%c</> escape prints a quasi-unique session identifier,
consisting of two 4-byte hexadecimal numbers
separated by a dot.
The numbers are the process start time and the
consisting of two 4-byte hexadecimal numbers
(without leading zeros)
separated by a dot.
The numbers are the process start time and the
process ID, so <literal>%c</> can also be used as a space saving way
of printing those items. For example, to generate the session
identifier from <literal>pg_stat_activity</>, use this query:
<programlisting>
SELECT to_hex(EXTRACT(EPOCH FROM backend_start)::integer) || '.' ||
regexp_replace('0000' || '0133e3', '^0*(.{4,})$', '\1'
)
to_hex(pid
)
FROM pg_stat_activity;
</programlisting>
...
...
doc/src/sgml/release-9.3.sgml
浏览文件 @
8b06e6ab
...
...
@@ -78,14 +78,6 @@
</para>
</listitem>
<listitem>
<para>
Have <quote>session id</> (<literal>%c</>) in <link
linkend="guc-log-line-prefix"><varname>log_line_prefix</></link>
always output at least four hex digits after the period (Bruce Momjian)
</para>
</listitem>
</itemizedlist>
</sect3>
...
...
src/backend/utils/error/elog.c
浏览文件 @
8b06e6ab
...
...
@@ -2087,7 +2087,7 @@ log_line_prefix(StringInfo buf, ErrorData *edata)
}
break
;
case
'c'
:
appendStringInfo
(
buf
,
"%lx.%
04
x"
,
(
long
)
(
MyStartTime
),
MyProcPid
);
appendStringInfo
(
buf
,
"%lx.%x"
,
(
long
)
(
MyStartTime
),
MyProcPid
);
break
;
case
'p'
:
appendStringInfo
(
buf
,
"%d"
,
MyProcPid
);
...
...
@@ -2266,7 +2266,7 @@ write_csvlog(ErrorData *edata)
appendStringInfoChar
(
&
buf
,
','
);
/* session id */
appendStringInfo
(
&
buf
,
"%lx.%
04
x"
,
(
long
)
MyStartTime
,
MyProcPid
);
appendStringInfo
(
&
buf
,
"%lx.%x"
,
(
long
)
MyStartTime
,
MyProcPid
);
appendStringInfoChar
(
&
buf
,
','
);
/* Line number */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录