4242 <sect1 id="logicaldecoding-example">
4343 <title>Logical Decoding Example</title>
4444 <para>
45- The following example demonstartes the SQL interface.
45+ The following example demonstrates the SQL interface.
4646 </para>
4747 <para>
4848 Before you can use logical decoding, you must set
4949 <xref linkend="guc-wal-level"> to logical and
50- <xref linkend="guc-max-replication-slots"> ot at least 1.
50+ <xref linkend="guc-max-replication-slots"> to at least 1.
5151 Then, you should connect to the target database (in the example
5252 below, <literal>postgres</literal>) as a superuser.
5353 </para>
@@ -98,8 +98,8 @@ postgres=# SELECT * FROM pg_logical_slot_get_changes('regression_slot', NULL, NU
9898 location | xid | data
9999-----------+-----+-----------------------------------------------
100100 0/16E0478 | 689 | BEGIN 689
101- 0/16E0478 | 689 | table public.data: INSERT: id[int4 ]:1 data[text]:'1'
102- 0/16E0580 | 689 | table public.data: INSERT: id[int4 ]:2 data[text]:'2'
101+ 0/16E0478 | 689 | table public.data: INSERT: id[integer ]:1 data[text]:'1'
102+ 0/16E0580 | 689 | table public.data: INSERT: id[integer ]:2 data[text]:'2'
103103 0/16E0650 | 689 | COMMIT 689
104104(4 rows)
105105
@@ -110,7 +110,7 @@ postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, N
110110 location | xid | data
111111-----------+-----+-----------------------------------------------
112112 0/16E09C0 | 690 | BEGIN 690
113- 0/16E09C0 | 690 | table public.data: INSERT: id[int4 ]:3 data[text]:'3'
113+ 0/16E09C0 | 690 | table public.data: INSERT: id[integer ]:3 data[text]:'3'
114114 0/16E0B90 | 690 | COMMIT 690
115115(3 rows)
116116
@@ -119,7 +119,7 @@ postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, N
119119 location | xid | data
120120-----------+-----+-----------------------------------------------
121121 0/16E09C0 | 690 | BEGIN 690
122- 0/16E09C0 | 690 | table public.data: INSERT: id[int4 ]:3 data[text]:'3'
122+ 0/16E09C0 | 690 | table public.data: INSERT: id[integer ]:3 data[text]:'3'
123123 0/16E0B90 | 690 | COMMIT 690
124124(3 rows)
125125
@@ -128,7 +128,7 @@ postgres=# SELECT * FROM pg_logical_slot_peek_changes('regression_slot', NULL, N
128128 location | xid | data
129129-----------+-----+-----------------------------------------------
130130 0/16E09C0 | 690 | BEGIN 690
131- 0/16E09C0 | 690 | table public.data: INSERT: id[int4 ]:3 data[text]:'3'
131+ 0/16E09C0 | 690 | table public.data: INSERT: id[integer ]:3 data[text]:'3'
132132 0/16E0B90 | 690 | COMMIT 690 (at 2014-02-27 16:41:51.863092+01)
133133(3 rows)
134134
@@ -155,7 +155,7 @@ CTRL-Z
155155# psql -c "INSERT INTO data(data) VALUES('4');"
156156# fg
157157BEGIN 693
158- table public.data: INSERT: id[int4 ]:4 data[text]:'4'
158+ table public.data: INSERT: id[integer ]:4 data[text]:'4'
159159COMMIT 693
160160CTRL-C
161161# pg_recvlogical -d testdb --slot test --drop
@@ -251,7 +251,7 @@ CTRL-C
251251 SNAPSHOT</literal></link> to read the state of the database at the moment
252252 the slot was created. This transaction can then be used to dump the
253253 database's state at that point in time which afterwards can be updated
254- using the slot's contents without loosing any changes.
254+ using the slot's contents without losing any changes.
255255 </para>
256256 </sect2>
257257 </sect1>
@@ -344,7 +344,7 @@ typedef void (*LogicalOutputPluginInit)(struct OutputPluginCallbacks *cb);
344344 backend's normal infrastructure, including calling output functions. Read
345345 only access to relations is permitted as long as only relations are
346346 accessed that either have been created by <command>initdb</command> in
347- the <literal>pg_catalog</literal> schema, or have are marked as user
347+ the <literal>pg_catalog</literal> schema, or have been marked as user
348348 provided catalog tables using
349349 <programlisting>
350350ALTER 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);
368368 the <literal>begin</literal> and <literal>commit</literal>
369369 callbacks. Transactions that were rolled back explicitly or implicitly
370370 never get
371- decoded. Successfull <link linkend="SQL-SAVEPOINT">SAVEPOINTs</link> are
371+ decoded. Successful <link linkend="SQL-SAVEPOINT">SAVEPOINTs</link> are
372372 folded into the transaction containing them in the order they were
373- exectuded within that transaction.
373+ executed within that transaction.
374374 </para>
375375 <note>
376376 <para>
@@ -385,7 +385,7 @@ CREATE TABLE another_catalog_table(data text) WITH (user_catalog_table = true);
385385 <title>Startup Callback</title>
386386 <para>
387387 The optional <function>startup_cb</function> callback is called whenever
388- an replication slot is created or asked to stream changes, independent
388+ a replication slot is created or asked to stream changes, independent
389389 of the number of changes that are ready to be put out.
390390 <programlisting>
391391typedef void (*LogicalDecodeStartupCB) (
@@ -394,7 +394,7 @@ typedef void (*LogicalDecodeStartupCB) (
394394 bool is_init
395395);
396396 </programlisting>
397- The <literal>is_init</literal> paramter will be true when the
397+ The <literal>is_init</literal> parameter will be true when the
398398 replication slot is being created and false
399399 otherwise. <parameter>options</parameter> points to a struct of options
400400 that output plugins can set:
0 commit comments