Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
3ee4fcfc
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,发现更多精彩内容 >>
提交
3ee4fcfc
编写于
3月 18, 2014
作者:
R
Robert Haas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Logical decoding documentation corrections.
Thom Brown
上级
a3b30d4c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
14 deletion
+14
-14
doc/src/sgml/logicaldecoding.sgml
doc/src/sgml/logicaldecoding.sgml
+14
-14
未找到文件。
doc/src/sgml/logicaldecoding.sgml
浏览文件 @
3ee4fcfc
...
...
@@ -42,12 +42,12 @@
<sect1 id="logicaldecoding-example">
<title>Logical Decoding Example</title>
<para>
The following example demonst
ar
tes the SQL interface.
The following example demonst
ra
tes the SQL interface.
</para>
<para>
Before you can use logical decoding, you must set
<xref linkend="guc-wal-level"> to logical and
<xref linkend="guc-max-replication-slots">
ot
at least 1.
<xref linkend="guc-max-replication-slots">
to
at least 1.
Then, you should connect to the target database (in the example
below, <literal>postgres</literal>) as a superuser.
</para>
...
...
@@ -98,8 +98,8 @@ postgres=# SELECT * FROM pg_logical_slot_get_changes('regression_slot', NULL, NU
location | xid | data
-----------+-----+-----------------------------------------------
0/16E0478 | 689 | BEGIN 689
0/16E0478 | 689 | table public.data: INSERT: id[int
4
]:1 data[text]:'1'
0/16E0580 | 689 | table public.data: INSERT: id[int
4
]:2 data[text]:'2'
0/16E0478 | 689 | table public.data: INSERT: id[int
eger
]:1 data[text]:'1'
0/16E0580 | 689 | table public.data: INSERT: id[int
eger
]:2 data[text]:'2'
0/16E0650 | 689 | COMMIT 689
(4 rows)
...
...
@@ -110,7 +110,7 @@ postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, N
location | xid | data
-----------+-----+-----------------------------------------------
0/16E09C0 | 690 | BEGIN 690
0/16E09C0 | 690 | table public.data: INSERT: id[int
4
]:3 data[text]:'3'
0/16E09C0 | 690 | table public.data: INSERT: id[int
eger
]:3 data[text]:'3'
0/16E0B90 | 690 | COMMIT 690
(3 rows)
...
...
@@ -119,7 +119,7 @@ postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, N
location | xid | data
-----------+-----+-----------------------------------------------
0/16E09C0 | 690 | BEGIN 690
0/16E09C0 | 690 | table public.data: INSERT: id[int
4
]:3 data[text]:'3'
0/16E09C0 | 690 | table public.data: INSERT: id[int
eger
]:3 data[text]:'3'
0/16E0B90 | 690 | COMMIT 690
(3 rows)
...
...
@@ -128,7 +128,7 @@ postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, N
location | xid | data
-----------+-----+-----------------------------------------------
0/16E09C0 | 690 | BEGIN 690
0/16E09C0 | 690 | table public.data: INSERT: id[int
4
]:3 data[text]:'3'
0/16E09C0 | 690 | table public.data: INSERT: id[int
eger
]:3 data[text]:'3'
0/16E0B90 | 690 | COMMIT 690 (at 2014-02-27 16:41:51.863092+01)
(3 rows)
...
...
@@ -155,7 +155,7 @@ CTRL-Z
# psql -c "INSERT INTO data(data) VALUES('4');"
# fg
BEGIN 693
table public.data: INSERT: id[int
4
]:4 data[text]:'4'
table public.data: INSERT: id[int
eger
]:4 data[text]:'4'
COMMIT 693
CTRL-C
# pg_recvlogical -d testdb --slot test --drop
...
...
@@ -251,7 +251,7 @@ CTRL-C
SNAPSHOT</literal></link> to read the state of the database at the moment
the slot was created. This transaction can then be used to dump the
database's state at that point in time which afterwards can be updated
using the slot's contents without lo
o
sing any changes.
using the slot's contents without losing any changes.
</para>
</sect2>
</sect1>
...
...
@@ -344,7 +344,7 @@ typedef void (*LogicalOutputPluginInit)(struct OutputPluginCallbacks *cb);
backend's normal infrastructure, including calling output functions. Read
only access to relations is permitted as long as only relations are
accessed that either have been created by <command>initdb</command> in
the <literal>pg_catalog</literal> schema, or have
are
marked as user
the <literal>pg_catalog</literal> schema, or have
been
marked as user
provided catalog tables using
<programlisting>
ALTER TABLE user_catalog_table SET (user_catalog_table = true);
...
...
@@ -368,9 +368,9 @@ CREATE TABLE another_catalog_table(data text) WITH (user_catalog_table = true);
the <literal>begin</literal> and <literal>commit</literal>
callbacks. Transactions that were rolled back explicitly or implicitly
never get
decoded. Successful
l
<link linkend="SQL-SAVEPOINT">SAVEPOINTs</link> are
decoded. Successful <link linkend="SQL-SAVEPOINT">SAVEPOINTs</link> are
folded into the transaction containing them in the order they were
exec
tud
ed within that transaction.
exec
ut
ed within that transaction.
</para>
<note>
<para>
...
...
@@ -385,7 +385,7 @@ CREATE TABLE another_catalog_table(data text) WITH (user_catalog_table = true);
<title>Startup Callback</title>
<para>
The optional <function>startup_cb</function> callback is called whenever
a
n
replication slot is created or asked to stream changes, independent
a replication slot is created or asked to stream changes, independent
of the number of changes that are ready to be put out.
<programlisting>
typedef void (*LogicalDecodeStartupCB) (
...
...
@@ -394,7 +394,7 @@ typedef void (*LogicalDecodeStartupCB) (
bool is_init
);
</programlisting>
The <literal>is_init</literal> paramter will be true when the
The <literal>is_init</literal> param
e
ter will be true when the
replication slot is being created and false
otherwise. <parameter>options</parameter> points to a struct of options
that output plugins can set:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录