From: | Ajin Cherian <itsajin(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <akapila(at)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com> |
Subject: | Re: Decoding of two-phase xacts missing from CREATE_REPLICATION_SLOT command |
Date: | 2021-06-15 07:34:21 |
Message-ID: | CAFPTHDb3c=ZEtnMhwf9xi_PnH1e5LWF7wxFGxAZ-e-4fV9DsXw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jun 11, 2021 at 8:14 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)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
Attachment | Content-Type | Size |
---|---|---|
v5-0001-Add-option-to-set-two-phase-in-CREATE_REPLICATION.patch | application/octet-stream | 6.5 KB |
v5-0002-Add-support-for-two-phase-decoding-in-pg_recvlogi.patch | application/octet-stream | 11.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2021-06-15 07:37:11 | Re: Use singular number when appropriate |
Previous Message | Kyotaro Horiguchi | 2021-06-15 06:39:31 | Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options |