Search Postgresql Archives

Re: PREPARE TRANSACTION and webapps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, 15 Nov 2005, Lincoln Yeoh wrote:

Can we have a reconnect and "reopen prepared/saved transactions" feature?

Please? :)


Note that this (transaction suspend/resume) is also required for a full implementation of XA. Our current 2PC only supports the basics. There's a bunch of other complicated features, like transaction interleaving[1] and multiple threads of control participating in the same backend transaction[2] that we currently don't support either. Now some of these may be worked around and faked on the driver side, but it won't be able to do these well. For example you could implement suspend/resume by simply holding the backend connection open or you could implement interleaved transactions by opening multiple connections, but both have a serious cost in the number of open connections. It would be better to implement this functionality in the backend, but I'm not sure how important these situations are in the real world. Some on the jdbc list have shown ways to configure transaction managers to avoid using these exotic features.

Also I think that trying to use 2PC without a real transaction manager is just asking for trouble. Normal XA usage is two serverside resources held open the time it takes to service a single request, not wait for user input. A random webapp leaving suspended or prepared transactions around is going to lock things up in a hurry.

Kris Jurka

[1] http://archives.postgresql.org/pgsql-jdbc/2005-06/msg00165.php
[2] http://archives.postgresql.org/pgsql-jdbc/2005-06/msg00171.php

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux