Re: repeated decoding of prepared transactions

From: Andres Freund <andres(at)anarazel(dot)de>
To: Ajin Cherian <itsajin(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Markus Wanner <markus(dot)wanner(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: repeated decoding of prepared transactions
Date: 2021-02-20 20:13:17
Message-ID: 20210220201317.inhqubqnoyfk4uc7@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2021-02-19 13:50:52 +1100, Ajin Cherian wrote:
> From 129947ab2d0ba223862ed1c87be0f96b51645ba0 Mon Sep 17 00:00:00 2001
> From: Ajin Cherian <ajinc(at)fast(dot)au(dot)fujitsu(dot)com>
> Date: Thu, 18 Feb 2021 20:18:16 -0500
> Subject: [PATCH] Don't allow repeated decoding of prepared transactions.
>
> Enforce full snapshot while decoding with two-phase enabled. This
> allows the decoder to differentiate between prepared transaction that
> were sent prior to restart and prepared transactions that were not sent
> because they were prior to consistent snapshot.

Isn't this an *extremely* expensive solution? Maintaining a full
snapshot is pretty darn expensive - so expensive that it's repeatedly
been a problem even just for building the initial snapshot (to the point
of being inable to do so). And that's typically a comparatively rare
operation, not something continual - but what you're proposing is a cost
paid during ongoing replication.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Wanner 2021-02-20 20:44:30 Re: [PATCH] Present all committed transaction to the output plugin
Previous Message Andres Freund 2021-02-20 20:08:18 Re: [PATCH] Present all committed transaction to the output plugin