On Thu, May 27, 2021 at 11:20 AM tanghy.f...@fujitsu.com
<tanghy.f...@fujitsu.com> wrote:
>
> On Wed, May 26, 2021 10:13 PM Ajin Cherian <itsa...@gmail.com> wrote:
> >
> > I've attached a patch that fixes this issue. Do test and confirm.
> >
>
> Thanks for your patch.
> I have tested and confirmed that the issue I reported has been fixed.

Thanks for confirmation. The problem seemed to be as you reported a
table not closed when a transaction was committed.
This seems to be because the function UpdateTwoPhaseState was
committing a transaction inside the function when the caller of
UpdateTwoPhaseState had
a table open in CreateSubscription. This function was newly included
in the CreateSubscription code, to handle the new use case of
two_phase being enabled on
create subscription if "copy_data = false". I don't think
CreateSubscription required this to be inside a transaction and the
committing of transaction
was only meant for where this function was originally created to be
used in the apply worker code (ApplyWorkerMain()).
So, I removed the committing of the transaction from inside the
function UpdateTwoPhaseState() and instead started and committed the
transaction
 prior to and after this function is invoked in the apply worker code.

regards,
Ajin Cherian
Fujitsu Australia


Reply via email to