Robert Haas <robertmh...@gmail.com> writes: > I was involved in some internal discussions related to this patch, so > I have some opinions on it. The long-term, high-level goal here is to > facilitate sharding. If we've got a bunch of PostgreSQL servers > interlinked via postgres_fdw, it should be possible to perform > transactions on the cluster in such a way that transactions are just > as atomic, consistent, isolated, and durable as they would be with > just one server. As far as I know, there is no way to achieve this > goal through the use of an external transaction manager, because even > if that external transaction manager guarantees, for every > transaction, that the transaction either commits on all nodes or rolls > back on all nodes, there's no way for it to guarantee that other > transactions won't see some intermediate state where the commit has > been completed on some nodes but not others. To get that, you need > some of integration that reaches down to the way snapshots are taken.
That's a laudable goal, but I would bet that nothing built on the FDW infrastructure will ever get there. Certainly the proposed patch doesn't look like it moves us very far towards that set of goalposts. > I think, though, that it might be worthwhile to first solve the > simpler problem of figuring out how to ensure that a transaction > commits everywhere or rolls back everywhere, even if intermediate > states might still be transiently visible. Perhaps. I suspect that it might still be a dead end if the ultimate goal is cross-system atomic commit ... but likely it would teach us some useful things anyway. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers