Re: Do we need to handle orphaned prepared transactions in the server?

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Kellerer <shammat(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Do we need to handle orphaned prepared transactions in the server?
Date: 2020-01-23 04:33:33
Message-ID: CAMsr+YFiN+RYV-DYtDrq1LHfLs7_PmWwh6hE1mOV_ZdvB87n=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 22 Jan 2020 at 23:22, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Thomas Kellerer <shammat(at)gmx(dot)net> writes:
> > Tom Lane schrieb am 22.01.2020 um 16:05:
> >> Right. It's the XA transaction manager's job not to forget uncommitted
> >> transactions. Reasoning as though no TM exists is not only not very
> >> relevant, but it might lead you to put in features that actually
> >> make the TM's job harder. In particular, a timeout (or any other
> >> mechanism that leads PG to abort or commit a prepared transaction
> >> of its own accord) does that.
>
> > That's a fair point, but the reality is that not all XA transaction managers
> > do a good job with that.
>
> If you've got a crappy XA manager, you should get a better one, not
> ask us to put in features that make PG unsafe to use with well-designed
> XA managers.

Agreed. Or use some bespoke script that does the cleanup that you
think is appropriate for your particular environment and set of bugs.

--
Craig Ringer http://www.2ndQuadrant.com/
2ndQuadrant - PostgreSQL Solutions for the Enterprise

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-01-23 04:42:01 Re: Allow to_date() and to_timestamp() to accept localized names
Previous Message Amit Kapila 2020-01-23 04:31:19 Re: Error message inconsistency