|
23 | 23 | Every output plugin has access to each individual new row produced
|
24 | 24 | by <command>INSERT</command> and the new row version created
|
25 | 25 | by <command>UPDATE</command>. Availability of old row versions for
|
26 |
| - <command>UPDATE</command> and delete <command>DELETE</command> depends on |
| 26 | + <command>UPDATE</command> and <command>DELETE</command> depends on |
27 | 27 | the configured
|
28 | 28 | <link linkend="SQL-CREATETABLE-REPLICA-IDENTITY"><literal>REPLICA
|
29 | 29 | IDENTITY</literal></link>.
|
|
46 | 46 | </para>
|
47 | 47 | <para>
|
48 | 48 | Before you can use logical decoding, you must set
|
49 |
| - <xref linkend="guc-wal-level"> to logical and |
| 49 | + <xref linkend="guc-wal-level"> to <literal>logical</literal> and |
50 | 50 | <xref linkend="guc-max-replication-slots"> to at least 1.
|
51 | 51 | Then, you should connect to the target database (in the example
|
52 | 52 | below, <literal>postgres</literal>) as a superuser.
|
@@ -149,16 +149,16 @@ postgres=# SELECT pg_drop_replication_slot('regression_slot');
|
149 | 149 | another connection.
|
150 | 150 | </para>
|
151 | 151 | <programlisting>
|
152 |
| -# pg_recvlogical -d testdb --slot test --create |
153 |
| -# pg_recvlogical -d testdb --slot test --start -f - |
| 152 | +# pg_recvlogical -d postgres --slot test --create |
| 153 | +# pg_recvlogical -d postgres --slot test --start -f - |
154 | 154 | CTRL-Z
|
155 |
| -# psql -c "INSERT INTO data(data) VALUES('4');" |
| 155 | +# psql -d postgres -c "INSERT INTO data(data) VALUES('4');" |
156 | 156 | # fg
|
157 | 157 | BEGIN 693
|
158 | 158 | table public.data: INSERT: id[integer]:4 data[text]:'4'
|
159 | 159 | COMMIT 693
|
160 | 160 | CTRL-C
|
161 |
| -# pg_recvlogical -d testdb --slot test --drop |
| 161 | +# pg_recvlogical -d postgres --slot test --drop |
162 | 162 | </programlisting>
|
163 | 163 | </sect1>
|
164 | 164 | <sect1 id="logicaldecoding-explanation">
|
@@ -198,7 +198,7 @@ CTRL-C
|
198 | 198 | in the stream).
|
199 | 199 | </para>
|
200 | 200 | <note>
|
201 |
| - <para>PostgreSQL also has streaming replication slots |
| 201 | + <para><productname>PostgreSQL</productname> also has streaming replication slots |
202 | 202 | (see <xref linkend="streaming-replication">), but they are used somewhat
|
203 | 203 | differently there.
|
204 | 204 | </para>
|
@@ -258,8 +258,8 @@ CTRL-C
|
258 | 258 | <sect1 id="logicaldecoding-walsender">
|
259 | 259 | <title>Streaming Replication Protocol Interface</title>
|
260 | 260 | <para>
|
261 |
| - The <literal>CREATE_REPLICATION_SLOT SLOT slotname LOGICAL |
262 |
| - options</literal>, <literal>DROP_REPLICATION_SLOT SLOT slotname</literal> |
| 261 | + The <literal>CREATE_REPLICATION_SLOT slotname LOGICAL |
| 262 | + options</literal>, <literal>DROP_REPLICATION_SLOT slotname</literal> |
263 | 263 | and <literal>START_REPLICATION SLOT slotname LOGICAL options</literal>
|
264 | 264 | commands can be used to create, drop and stream changes from a replication
|
265 | 265 | slot respectively. These commands are only available over a replication
|
|
0 commit comments