@@ -600,109 +600,112 @@ DETAIL: Synchronization could lead to data loss, because the remote slot needs
600
600
<title>Options</title>
601
601
602
602
<variablelist>
603
- <varlistentry>
604
- <term>
605
- proto_version
606
- </term>
603
+ <varlistentry id="pgoutput-options-proto-version">
604
+ <term><varname>proto_version</varname> (<type>integer</type>)</term>
607
605
<listitem>
608
606
<para>
609
- Protocol version. Currently versions <literal>1</literal>, <literal>2</literal>,
607
+ Specifies the protocol version.
608
+ Currently versions <literal>1</literal>, <literal>2</literal>,
610
609
<literal>3</literal>, and <literal>4</literal> are supported. A valid
611
610
version is required.
612
611
</para>
613
612
<para>
614
- Version <literal>2</literal> is supported only for server version 14
615
- and above, and it allows streaming of large in-progress transactions.
613
+ Version <literal>2</literal> is supported on server version 14
614
+ and above, and is required when <varname>streaming</varname>
615
+ is set to <literal>on</literal> to stream large in-progress
616
+ transactions.
616
617
</para>
617
618
<para>
618
- Version <literal>3</literal> is supported only for server version 15
619
- and above, and it allows streaming of two-phase commits.
619
+ Version <literal>3</literal> is supported on server version 15
620
+ and above, and is required when <varname>two_phase</varname>
621
+ is enabled to stream two-phase commits.
620
622
</para>
621
623
<para>
622
- Version <literal>4</literal> is supported only for server version 16
623
- and above, and it allows streams of large in-progress transactions to
624
- be applied in parallel.
624
+ Version <literal>4</literal> is supported on server version 16
625
+ and above, and is required when <varname>streaming</varname>
626
+ is set to <literal>parallel</literal> to stream large in-progress
627
+ transactions to be applied in parallel.
625
628
</para>
626
629
</listitem>
627
630
</varlistentry>
628
631
629
- <varlistentry>
630
- <term>
631
- publication_names
632
- </term>
632
+ <varlistentry id="pgoutput-options-publication-names">
633
+ <term><varname>publication_names</varname> (<type>string</type>)</term>
633
634
<listitem>
634
635
<para>
635
- Comma -separated list of publication names for which to subscribe
636
- (receive changes). The individual publication names are treated
636
+ A comma -separated list of publication names to subscribe to.
637
+ The individual publication names are treated
637
638
as standard objects names and can be quoted the same as needed.
638
639
At least one publication name is required.
639
640
</para>
640
641
</listitem>
641
642
</varlistentry>
642
643
643
- <varlistentry>
644
- <term>
645
- binary
646
- </term>
644
+ <varlistentry id="pgoutput-options-binary">
645
+ <term><varname>binary</varname> (<type>boolean</type>)</term>
647
646
<listitem>
648
647
<para>
649
- Boolean option to use binary transfer mode. Binary mode is faster
648
+ Enables binary transfer mode. Binary mode is faster
650
649
than the text mode but slightly less robust.
651
650
The default is <literal>off</literal>.
652
651
</para>
653
652
</listitem>
654
653
</varlistentry>
655
654
656
- <varlistentry>
657
- <term>
658
- messages
659
- </term>
655
+ <varlistentry id="pgoutput-options-messages">
656
+ <term><varname>messages</varname> (<type>boolean</type>)</term>
660
657
<listitem>
661
658
<para>
662
- Boolean option to enable sending the messages that are written
663
- by <function>pg_logical_emit_message</function>.
659
+ Enables sending the messages that are written by
660
+ <function><link linkend="pg-logical-emit-message"> pg_logical_emit_message</link> </function>.
664
661
The default is <literal>off</literal>.
665
662
</para>
666
663
</listitem>
667
664
</varlistentry>
668
665
669
- <varlistentry>
670
- <term>
671
- streaming
672
- </term>
666
+ <varlistentry id="pgoutput-options-streaming">
667
+ <term><varname>streaming</varname> (<type>enum</type>)</term>
673
668
<listitem>
674
669
<para>
675
- Option to enable streaming of in-progress transactions. Valid values are
670
+ Enables streaming of in-progress transactions. Valid values are
676
671
<literal>off</literal> (the default), <literal>on</literal> and
677
- <literal>parallel</literal>. The setting <literal>parallel</literal>
678
- enables sending extra information with some messages to be used for
679
- parallelization. Minimum protocol version 2 is required to turn it
680
- <literal>on</literal>. Minimum protocol version 4 is required for the
681
- <literal>parallel</literal> value.
672
+ <literal>parallel</literal>.
673
+ </para>
674
+ <para>
675
+ When set to <literal>off</literal>, <filename>pgoutput</filename>
676
+ fully decodes a transaction before sending it as a whole.
677
+ This mode works with any protocol version.
678
+ </para>
679
+ <para>
680
+ When set to <literal>on</literal>, <filename>pgoutput</filename>
681
+ streams large in-progress transactions.
682
+ This requires protocol version 2 or higher.
683
+ </para>
684
+ <para>
685
+ When set to <literal>parallel</literal>, <filename>pgoutput</filename>
686
+ streams large in-progress transactions and also sends
687
+ extra information in some messages to support parallel processing.
688
+ This requires protocol version 4 or higher.
682
689
</para>
683
690
</listitem>
684
691
</varlistentry>
685
692
686
- <varlistentry>
687
- <term>
688
- two_phase
689
- </term>
693
+ <varlistentry id="pgoutput-options-two-phase">
694
+ <term><varname>two_phase</varname> (<type>boolean</type>)</term>
690
695
<listitem>
691
696
<para>
692
- Boolean option to enable two-phase transactions. Minimum protocol
693
- version 3 is required to turn it on.
697
+ Enables sending two-phase transactions.
698
+ Minimum protocol version 3 is required to turn it on.
694
699
The default is <literal>off</literal>.
695
700
</para>
696
701
</listitem>
697
702
</varlistentry>
698
703
699
- <varlistentry>
700
- <term>
701
- origin
702
- </term>
704
+ <varlistentry id="pgoutput-options-origin">
705
+ <term><varname>origin</varname> (<type>enum</type>)</term>
703
706
<listitem>
704
707
<para>
705
- Option to send changes by their origin. Possible values are
708
+ Specifies whether to send changes by their origin. Possible values are
706
709
<literal>none</literal> to only send the changes that have no origin
707
710
associated, or <literal>any</literal>
708
711
to send the changes regardless of their origin. This can be used
@@ -715,6 +718,21 @@ DETAIL: Synchronization could lead to data loss, because the remote slot needs
715
718
</variablelist>
716
719
717
720
</sect3>
721
+
722
+ <sect3 id="logicaldecoding-pgoutput-notes">
723
+ <title>Notes</title>
724
+
725
+ <para>
726
+ <filename>pgoutput</filename> produces binary output,
727
+ so functions expecting textual data (
728
+ <function><link linkend="pg-logical-slot-peek-changes">pg_logical_slot_peek_changes</link></function> and
729
+ <function><link linkend="pg-logical-slot-get-changes">pg_logical_slot_get_changes</link></function>)
730
+ cannot be used with it. Use
731
+ <function><link linkend="pg-logical-slot-peek-binary-changes">pg_logical_slot_peek_binary_changes</link></function> or
732
+ <function><link linkend="pg-logical-slot-get-binary-changes">pg_logical_slot_get_binary_changes</link></function>
733
+ instead.
734
+ </para>
735
+ </sect3>
718
736
</sect2>
719
737
</sect1>
720
738
0 commit comments