From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | dilipbalaut(at)gmail(dot)com |
Cc: | kuroda(dot)hayato(at)fujitsu(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, osumi(dot)takamichi(at)fujitsu(dot)com |
Subject: | Re: test_decoding assertion failure for the loss of top-sub transaction relationship |
Date: | 2022-09-02 05:46:36 |
Message-ID: | 20220902.144636.337964577345874464.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Fri, 2 Sep 2022 10:59:56 +0530, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote in
> On Fri, Sep 2, 2022 at 6:38 AM kuroda(dot)hayato(at)fujitsu(dot)com
> <kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
> >
> > Hi Hackers,
> >
> > > Therefore, this leads to the failure for the assert that can check
> > > the consistency that when one sub transaction modifies the catalog,
> > > its top transaction should be marked so as well.
> > >
> > > I feel we need to remember the relationship between top transaction and sub
> > > transaction
> > > in the serialized snapshot even before changing catalog at decoding
> > > RUNNING_XACT,
> > > so that we can keep track of the association after the restart. What do you think ?
> >
> > PSA patch that fixes the failure.
> > This adds pairs of sub-top transactions to the SnapBuild, and it will be serialized and restored.
> > The pair will be checked when we mark the ReorderBufferTXN as RBTXN_HAS_CATALOG_CHANGES.
>
> It seems that SnapBuildCommitTxn() is already taking care of adding
> the top transaction to the committed transaction if any subtransaction
> has the catalog changes, it has just missed setting the flag so I
> think just setting the flag like this should be sufficient no?
Oops! That's right.
> diff --git a/src/backend/replication/logical/snapbuild.c
> b/src/backend/replication/logical/snapbuild.c
> index 1ff2c12..ee3f695 100644
> --- a/src/backend/replication/logical/snapbuild.c
> +++ b/src/backend/replication/logical/snapbuild.c
> @@ -1086,6 +1086,7 @@ SnapBuildCommitTxn(SnapBuild *builder,
> XLogRecPtr lsn, TransactionId xid,
> else if (sub_needs_timetravel)
> {
> /* track toplevel txn as well, subxact alone isn't meaningful */
> + needs_timetravel = true;
> SnapBuildAddCommittedTxn(builder, xid);
> }
> else if (needs_timetravel)
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | kuroda.hayato@fujitsu.com | 2022-09-02 05:54:58 | RE: test_decoding assertion failure for the loss of top-sub transaction relationship |
Previous Message | Pavel Stehule | 2022-09-02 05:42:00 | Re: Schema variables - new implementation for Postgres 15 |