Re: [HACKERS] logical decoding of two-phase transactions

From: Ajin Cherian <itsajin(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "Peter(dot)B(dot)Smith(at)fujitsu(dot)com" <Peter(dot)B(dot)Smith(at)fujitsu(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] logical decoding of two-phase transactions
Date: 2020-10-08 01:01:38
Message-ID: CAFPTHDbBGTSAQNsPdK_8XH5DoNT2QR=8fVTkaopHBALj00KTJg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 8, 2020 at 6:14 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> So, for an ordinary transaction, rollback implies an explicit user
> action, but an abort could either be an explicit user action (ABORT;
> or ROLLBACK;) or an error. I agree that calling that case "abort"
> rather than "rollback" is better. However, the situation is a bit
> different for a prepared transaction: no error can prevent such a
> transaction from being committed. That is the whole point of being
> able to prepare transactions. So it is not unreasonable to think of
> use "rollback" rather than "abort" for prepared transactions, but I
> think it would be wrong in other cases. On the other hand, using
> "abort" for all the cases also doesn't seem bad to me. It's true that
> there is no ABORT PREPARED command at the SQL level, but I don't think
> that is very important. I don't feel wrong saying that ROLLBACK
> PREPARED causes a transaction abort.
>

So, as I understand you don't object to renaming the callback APIs for
ROLLBACK PREPARED transactions to "rollback_prepared_cb" but keeping
the "stream_abort" as such. This was what I was planning on doing.
I was just writing this up, so wanted to confirm.

regards,
Ajin Cherian
Fujitsu Australia

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hou, Zhijie 2020-10-08 01:15:35 Probably typo in multixact.c
Previous Message Mark Dilger 2020-10-08 01:01:24 Re: new heapcheck contrib module