Re: tab completion for prepared transactions? - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: tab completion for prepared transactions?
Date
Msg-id 4B5CA517.1050105@enterprisedb.com
Whole thread Raw
In response to Re: tab completion for prepared transactions?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> What is the
> difference between a transaction manager and an application that opens
> multiple connections and does PREPARE + COMMIT PREPARED across them?

It's what happens if your application crashes after issuing the PREPARE.
A correctly configured transaction manager will know to reconnect to all
the resource managers (ie. databases), check its own transaction log,
decide which global transaction have committed, and issue the
COMMIT/ROLLBACK PREPARED commands to the resource managers to finish the
global transactions.

Sure, you can do all that in an application too, but I have yet to see
one that does (correctly). At the point that you do, you can say that
your application has a built-in transaction manager. Really, if you know
what you're doing, you'll know that note in the manual doesn't apply to you.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: commit fests
Next
From: Baron Schwartz
Date:
Subject: Re: MySQL-ism help patch for psql