Re: repeated decoding of prepared transactions

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Markus Wanner <markus.wanner@enterprisedb.com>, Ajin Cherian <itsajin@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Robert Haas <robertmhaas@gmail.com>, simon.riggs@enterprisedb.com, Petr Jelinek <petr.jelinek@enterprisedb.com>
Date: 2021-02-22T09:41:28Z
Lists: pgsql-hackers
On Mon, Feb 22, 2021 at 2:55 PM Andres Freund <andres@anarazel.de> wrote:
>
> Hi,
>
> On 2021-02-22 09:25:52 +0100, Markus Wanner wrote:
> > What issues do you see with the approach I proposed?
>
> Very significant increase in complexity for initializing a logical
> replica, because there's no easy way to just use the initial slot.
>

+1. The solution proposed by Andres seems to be better than other
ideas we have discussed so far.

-- 
With Regards,
Amit Kapila.



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.