From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
---|---|
To: | Ajin Cherian <itsajin(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] logical decoding of two-phase transactions |
Date: | 2020-10-26 03:25:49 |
Message-ID: | CAHut+PuX8EUDASE05V2iRudS15f6k4fA9_XXe26xvTLZdg_XpQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Ajin.
I've addressed your review comments (details below) and bumped the
patch set to v12 attached.
I also added more test cases.
On Tue, Oct 20, 2020 at 10:02 PM Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
> Thanks for your patch. Some comments for your patch:
>
> Comments:
>
> src/backend/replication/logical/worker.c
> @@ -888,6 +888,319 @@ apply_handle_prepare(StringInfo s)
> + /*
> + * FIXME - Following condition was in apply_handle_prepare_txn except
> I found it was ALWAYS IsTransactionState() == false
> + * The synchronization worker runs in single transaction. *
> + if (IsTransactionState() && !am_tablesync_worker())
> + */
> + if (!am_tablesync_worker())
>
> Comment: I dont think a tablesync worker will use streaming, none of
> the other stream APIs check this, this might not be relevant for
> stream_prepare either.
Updated
> + /*
> + * ==================================================================================================
> + * The following chunk of code is largely cut/paste from the existing
> apply_handle_prepare_commit_txn
>
> Comment: Here, I think you meant apply_handle_stream_commit.
Updated.
> Also
> rather than duplicating this chunk of code, you could put it in a new
> function.
Code is refactored to share a common function for the spool file processing.
> + else
> + {
> + /* Process any invalidation messages that might have accumulated. */
> + AcceptInvalidationMessages();
> + maybe_reread_subscription();
> + }
>
> Comment: This else block might not be necessary as a tablesync worker
> will not initiate the streaming APIs.
Updated
~
Kind Regards,
Peter Smith
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
v12-0001-Support-2PC-txn-base.patch | application/octet-stream | 41.1 KB |
v12-0002-Support-2PC-txn-backend-and-tests.patch | application/octet-stream | 47.7 KB |
v12-0003-Support-2PC-txn-pgoutput.patch | application/octet-stream | 58.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Julien Rouhaud | 2020-10-26 04:02:46 | Re: Supporting = operator in gin/gist_trgm_ops |
Previous Message | Chapman Flack | 2020-10-26 01:32:22 | A couple questions about ordered-set aggregates |