Re: repeated decoding of prepared transactions
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Ajin Cherian <itsajin@gmail.com>, Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-02-27T15:04:07Z
Lists: pgsql-hackers
On Sat, Feb 27, 2021 at 5:36 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Sat, Feb 27, 2021 at 11:38 AM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > On Fri, Feb 26, 2021 at 4:13 PM Ajin Cherian <itsajin@gmail.com> wrote: > > > > > > On Fri, Feb 26, 2021 at 7:47 PM Ajin Cherian <itsajin@gmail.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
Commits
-
Add option to enable two_phase commits via pg_create_logical_replication_slot.
- 19890a064ebf 14.0 landed
-
Avoid repeated decoding of prepared transactions after a restart.
- 8bdb1332eb51 14.0 landed
-
Allow decoding at prepare time in ReorderBuffer.
- a271a1b50e9b 14.0 cited