1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

pg_recvlogical: Rename --two-phase and --failover options.

This commit renames the pg_recvlogical options --two-phase and
--failover to --enable-two-phase and --enable-failover, respectively.
The new names distinguish these enabling options from action options
like --start and --create-slot, while clearly indicating their purpose
to enable specific logical slot features.

The option --failover is new in PostgreSQL 18 (commit cf2655a902), so
no compatibility break there.  The option --two-phase has existed
since PostgreSQL 15 (commit cda03cfed6), so for compatibility we keep
the old option name --two-phase around as deprecated.

Also note that pg_createsubscriber has acquired an --enable-two-phase
option, so this increases consistency across tools.

Co-authored-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/a28f66df-1354-4709-8d63-932ded4cac35@eisentraut.org
This commit is contained in:
Peter Eisentraut
2025-06-29 17:02:35 +02:00
parent 50fd428b2b
commit 6d12d5a433
4 changed files with 19 additions and 16 deletions

View File

@ -169,7 +169,7 @@ COMMIT 693
$ pg_recvlogical -d postgres --slot=test --drop-slot
Example 2:
$ pg_recvlogical -d postgres --slot=test --create-slot --two-phase
$ pg_recvlogical -d postgres --slot=test --create-slot --enable-two-phase
$ pg_recvlogical -d postgres --slot=test --start -f -
<keycombo action="simul"><keycap>Control</keycap><keycap>Z</keycap></keycombo>
$ psql -d postgres -c "BEGIN;INSERT INTO data(data) VALUES('5');PREPARE TRANSACTION 'test';"

View File

@ -79,8 +79,8 @@ PostgreSQL documentation
</para>
<para>
The <option>--two-phase</option> and <option>--failover</option> options
can be specified with <option>--create-slot</option>.
The <option>--enable-two-phase</option> and <option>--enable-failover</option>
options can be specified with <option>--create-slot</option>.
</para>
</listitem>
</varlistentry>
@ -166,7 +166,7 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
<term><option>--failover</option></term>
<term><option>--enable-failover</option></term>
<listitem>
<para>
Enables the slot to be synchronized to the standbys. This option may
@ -300,7 +300,8 @@ PostgreSQL documentation
<varlistentry>
<term><option>-t</option></term>
<term><option>--two-phase</option></term>
<term><option>--enable-two-phase</option></term>
<term><option>--two-phase</option> (deprecated)</term>
<listitem>
<para>
Enables decoding of prepared transactions. This option may only be specified with