Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
7ba6e4f0
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,发现更多精彩内容 >>
提交
7ba6e4f0
编写于
11月 09, 2010
作者:
R
Robert Haas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add monitoring function pg_last_xact_replay_timestamp.
Fujii Masao, with a little wordsmithing by me.
上级
844ed5dc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
41 addition
and
1 deletion
+41
-1
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+19
-0
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+18
-0
src/include/access/xlog_internal.h
src/include/access/xlog_internal.h
+1
-0
src/include/catalog/catversion.h
src/include/catalog/catversion.h
+1
-1
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc.h
+2
-0
未找到文件。
doc/src/sgml/func.sgml
浏览文件 @
7ba6e4f0
...
...
@@ -13551,6 +13551,9 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<indexterm>
<primary>
pg_last_xlog_replay_location
</primary>
</indexterm>
<indexterm>
<primary>
pg_last_xact_replay_timestamp
</primary>
</indexterm>
<para>
The functions shown in
<xref
...
...
@@ -13605,6 +13608,22 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
the function returns NULL.
</entry>
</row>
<row>
<entry>
<literal><function>
pg_last_xact_replay_timestamp()
</function></literal>
</entry>
<entry><type>
timestamp with time zone
</type></entry>
<entry>
Get timestamp of last transaction replayed during recovery.
This is the time at which the commit or abort WAL record for that
transaction was generated.
If no transactions have been replayed during recovery, this function
returns NULL. Otherwise, if recovery is still in progress this will
increase monotonically. If recovery has completed then this value will
remain static at the value of the last transaction applied during that
recovery. When the server has been started normally without recovery
the function returns NULL.
</entry>
</row>
</tbody>
</tgroup>
</table>
...
...
src/backend/access/transam/xlog.c
浏览文件 @
7ba6e4f0
...
...
@@ -5604,6 +5604,24 @@ GetLatestXTime(void)
return
xtime
;
}
/*
* Returns timestamp of latest processed commit/abort record.
*
* When the server has been started normally without recovery the function
* returns NULL.
*/
Datum
pg_last_xact_replay_timestamp
(
PG_FUNCTION_ARGS
)
{
TimestampTz
xtime
;
xtime
=
GetLatestXTime
();
if
(
xtime
==
0
)
PG_RETURN_NULL
();
PG_RETURN_TIMESTAMPTZ
(
xtime
);
}
/*
* Returns bool with current recovery mode, a global state.
*/
...
...
src/include/access/xlog_internal.h
浏览文件 @
7ba6e4f0
...
...
@@ -271,6 +271,7 @@ extern Datum pg_current_xlog_location(PG_FUNCTION_ARGS);
extern
Datum
pg_current_xlog_insert_location
(
PG_FUNCTION_ARGS
);
extern
Datum
pg_last_xlog_receive_location
(
PG_FUNCTION_ARGS
);
extern
Datum
pg_last_xlog_replay_location
(
PG_FUNCTION_ARGS
);
extern
Datum
pg_last_xact_replay_timestamp
(
PG_FUNCTION_ARGS
);
extern
Datum
pg_xlogfile_name_offset
(
PG_FUNCTION_ARGS
);
extern
Datum
pg_xlogfile_name
(
PG_FUNCTION_ARGS
);
extern
Datum
pg_is_in_recovery
(
PG_FUNCTION_ARGS
);
...
...
src/include/catalog/catversion.h
浏览文件 @
7ba6e4f0
...
...
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
#define CATALOG_VERSION_NO 20101
030
1
#define CATALOG_VERSION_NO 20101
109
1
#endif
src/include/catalog/pg_proc.h
浏览文件 @
7ba6e4f0
...
...
@@ -3383,6 +3383,8 @@ DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 f f
DESCR
(
"current xlog flush location"
);
DATA
(
insert
OID
=
3821
(
pg_last_xlog_replay_location
PGNSP
PGUID
12
1
0
0
f
f
f
t
f
v
0
0
25
""
_null_
_null_
_null_
_null_
pg_last_xlog_replay_location
_null_
_null_
_null_
));
DESCR
(
"last xlog replay location"
);
DATA
(
insert
OID
=
3830
(
pg_last_xact_replay_timestamp
PGNSP
PGUID
12
1
0
0
f
f
f
t
f
v
0
0
1184
""
_null_
_null_
_null_
_null_
pg_last_xact_replay_timestamp
_null_
_null_
_null_
));
DESCR
(
"timestamp of last replay xact"
);
DATA
(
insert
OID
=
2621
(
pg_reload_conf
PGNSP
PGUID
12
1
0
0
f
f
f
t
f
v
0
0
16
""
_null_
_null_
_null_
_null_
pg_reload_conf
_null_
_null_
_null_
));
DESCR
(
"reload configuration files"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录