Re: repeated decoding of prepared transactions

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Ajin Cherian <itsajin(at)gmail(dot)com>, 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-02-27 15:04:07
Message-ID: CALDaNm28huizeSMdM4nRtnAC1Fp3bkREo+260eKN01BqvG=2cQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Feb 27, 2021 at 5:36 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Sat, Feb 27, 2021 at 11:38 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Fri, Feb 26, 2021 at 4:13 PM Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
> > >
> > > On Fri, Feb 26, 2021 at 7:47 PM Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
> > >
> > > > I've updated snapshot_was_exported_at_ member to pg_replication_slots as well.
> > > > Do have a look and let me know if there are any comments.
> > >
> > > Update with both patches.
> > >
> >
> > Thanks, I have made some minor changes to the first patch and now it
> > looks good to me. The changes are as below:
> > 1. Removed the changes related to exposing this new parameter via view
> > as mentioned in my previous email.
> > 2. Changed the variable name initial_consistent_point.
> > 3. Ran pgindent, minor changes in comments, and modified the commit message.
> >
> > Let me know what you think about these changes.
> >
>
> In the attached, I have just bumped SNAPBUILD_VERSION as we are
> adding a new member in the SnapBuild structure.
>

Few minor comments:

git am v6-0001-Avoid-repeated-decoding-of-prepared-transactions-.patch
Applying: Avoid repeated decoding of prepared transactions after the restart.
/home/vignesh/postgres/.git/rebase-apply/patch:286: trailing whitespace.
#define SNAPBUILD_VERSION 4
warning: 1 line adds whitespace errors.

There is one whitespace error.

In commit a271a1b50e, we allowed decoding at prepare time and the prepare
was decoded again if there is a restart after decoding it. It was done
that way because we can't distinguish between the cases where we have not
decoded the prepare because it was prior to consistent snapshot or we have
decoded it earlier but restarted. To distinguish between these two cases,
we have introduced an initial_consisten_point at the slot level which is
an LSN at which we found a consistent point at the time of slot creation.

One minor typo in commit message, initial_consisten_point should be
initial_consistent_point

Regards,
Vignesh

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2021-02-27 15:19:30 Re: psql - add SHOW_ALL_RESULTS option
Previous Message vignesh C 2021-02-27 14:55:05 Re: repeated decoding of prepared transactions