Re: Decoding of two-phase xacts missing from CREATE_REPLICATION_SLOT command

Поиск
Список
Период
Сортировка
От Ajin Cherian
Тема Re: Decoding of two-phase xacts missing from CREATE_REPLICATION_SLOT command
Дата
Msg-id CAFPTHDb3c=ZEtnMhwf9xi_PnH1e5LWF7wxFGxAZ-e-4fV9DsXw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Decoding of two-phase xacts missing from CREATE_REPLICATION_SLOT command  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Decoding of two-phase xacts missing from CREATE_REPLICATION_SLOT command  (Ajin Cherian <itsajin@gmail.com>)
Список pgsql-hackers
On Fri, Jun 11, 2021 at 8:14 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>

> Also, I can take care of the below cosmetic issues before committing
> if we decide to do this for PG-14.
>
> Few cosmetic issues:
> ==================
> 1. git diff --check shows
> src/bin/pg_basebackup/t/030_pg_recvlogical.pl:109: new blank line at EOF.
>
> 2.
> +
>    <para>
>    The following example shows SQL interface that can be used to decode prepared
>    transactions. Before you use two-phase commit commands, you must set
>
> Spurious line addition.
>

Fixed.

> 3.
> /* Build query */
>   appendPQExpBuffer(query, "CREATE_REPLICATION_SLOT \"%s\"", slot_name);
>   if (is_temporary)
>   appendPQExpBufferStr(query, " TEMPORARY");
> +
>   if (is_physical)
>
> Spurious line addition.
>

Fixed.

> 4.
>   appendPQExpBuffer(query, " LOGICAL \"%s\"", plugin);
> + if (two_phase && PQserverVersion(conn) >= 140000)
> + appendPQExpBufferStr(query, " TWO_PHASE");
> +
>   if (PQserverVersion(conn) >= 100000)
>   /* pg_recvlogical doesn't use an exported snapshot, so suppress */
>   appendPQExpBufferStr(query, " NOEXPORT_SNAPSHOT");
>
> I think it might be better to append TWO_PHASE after NOEXPORT_SNAPSHOT
> but it doesn't matter much.
>

I haven't changed this, I like to keep it this way.

> 5.
> +$node->safe_psql('postgres',
> + "BEGIN;INSERT INTO test_table values (11); PREPARE TRANSACTION 'test'");
>
> There is no space after BEGIN but there is a space after INSERT. For
> consistency-sake, I will have space after BEGIN as well.

Changed this.

regards,
Ajin Cherian
Fujitsu Australia

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Use singular number when appropriate