From: | Ajin Cherian <itsajin(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: repeated decoding of prepared transactions |
Date: | 2021-03-01 01:53:17 |
Message-ID: | CAFPTHDYSYnSSEQak92bHKPVSzsr1ayAaSSoXgTrn6ir2qN8CGg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Feb 27, 2021 at 11:06 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> Few comments on 0002 patch:
> =========================
> 1.
> +
> + /*
> + * Disable two-phase here, it will be set in the core if it was
> + * enabled whole creating the slot.
> + */
> + ctx->twophase = false;
>
> Typo, /whole/while. I think we don't need to initialize this variable
> here at all.
>
> 2.
> + /* If twophase is set on the slot at create time, then
> + * make sure the field in the context is also updated
> + */
> + if (MyReplicationSlot->data.twophase)
> + {
> + ctx->twophase = true;
> + }
> +
>
> For multi-line comments, the first line of comment should be empty.
> Also, I think this is not the right place because the WALSender path
> needs to set it separately. I guess you can set it in
> CreateInitDecodingContext/CreateDecodingContext by doing something
> like
>
> ctx->twophase &= MyReplicationSlot->data.twophase
Updated accordingly.
>
> 3. I think we can support this option at the protocol level in a
> separate patch where we need to allow it via replication commands (say
> when we support it in CreateSubscription). Right now, there is nothing
> to test all the code you have added in repl_gram.y.
>
Removed that.
> 4. I think we can expose this new option via pg_replication_slots.
>
Done. Added,
regards,
Ajin Cherian
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
v7-0001-Avoid-repeated-decoding-of-prepared-transactions-.patch | application/octet-stream | 16.4 KB |
v7-0002-Add-option-to-enable-two-phase-commits-in-pg_crea.patch | application/octet-stream | 41.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-03-01 02:16:36 | Re: alter table set TABLE ACCESS METHOD |
Previous Message | Takashi Menjo | 2021-03-01 01:30:00 | Re: [PoC] Non-volatile WAL buffer |