Re: Transactional support across multiple machines...

From: Maciek Sakrejda <msakrejda(at)truviso(dot)com>
To: Peter Tap <ptrtap(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Transactional support across multiple machines...
Date: 2010-11-17 19:15:36
Message-ID: AANLkTim2TEDOiBN+bLWrf7gb4xfz3zJqTC4BGpyxyHTA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Once the transactions are prepared, they are serialized to disk and
you will be able to go back and commit them later even if you have a
database crash (assuming safe postgresql.conf settings). All
distributed commit mechanisms will be built on something like this
under the hood--there is no magical "commit everywhere atomically"
functionality (perhaps with quantum computing ;) ). But Heikki is
right--you probably want to go through higher-level APIs like JTA.
Just make sure you understand the recovery guarantees if you fail in
the middle of, e.g., a JTA commit, which could translate into some
committed prepared transactions and some uncommitted ones, or some
rolled back and some prepared.

Everything you need to either commit or roll back (depending on when
the failure occurred) the full set of transactions will be there on
disk, but I don't know whether the JTA implementation will do that for
you. And you definitely don't want prepared transactions sitting
around on disk indefinitely.
---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Fork 2010-11-18 05:26:20 Re: PSQLException: The column name <col> was not found in this ResultSet.
Previous Message Peter Tap 2010-11-17 18:55:21 Re: Transactional support across multiple machines...