Re: repeated decoding of prepared transactions

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: Ajin Cherian <itsajin@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Andres Freund <andres@anarazel.de>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-02-25T11:34:01Z
Lists: pgsql-hackers
On Wed, Feb 24, 2021 at 5:06 PM Ajin Cherian <itsajin@gmail.com> wrote:
>
> On Wed, Feb 24, 2021 at 4:48 PM Ajin Cherian <itsajin@gmail.com> wrote:
>
> > I plan to split this into two patches next. But do review and let me
> > know if you have any comments.
>
> Attaching an updated patch-set with the changes for
> snapshot_was_exported_at_lsn separated out from the changes for the
> APIs pg_create_logical_replication_slot() and
> pg_logical_slot_get_changes(). Along with a rebase that takes in a few
> more commits since my last patch.

One observation while verifying the patch I noticed that most of
ReplicationSlotPersistentData structure members are displayed in
pg_replication_slots, but I did not see snapshot_was_exported_at_lsn
being displayed. Is this intentional? If not intentional we can
include snapshot_was_exported_at_lsn in pg_replication_slots.

Regards,
Vignesh



Commits

  1. Add option to enable two_phase commits via pg_create_logical_replication_slot.

  2. Avoid repeated decoding of prepared transactions after a restart.

  3. Allow decoding at prepare time in ReorderBuffer.