RE: Transactions involving multiple postgres foreign servers, take 2 - Mailing list pgsql-hackers
From | k.jamison@fujitsu.com |
---|---|
Subject | RE: Transactions involving multiple postgres foreign servers, take 2 |
Date | |
Msg-id | TYCPR01MB64000CD589C201D95612A0E1EFB19@TYCPR01MB6400.jpnprd01.prod.outlook.com Whole thread Raw |
In response to | Re: Transactions involving multiple postgres foreign servers, take 2 (Fujii Masao <masao.fujii@oss.nttdata.com>) |
Responses |
Re: Transactions involving multiple postgres foreign servers, take 2
|
List | pgsql-hackers |
Hi Fujii-san and Sawada-san, Thank you very much for your replies. > >> I noticed that this thread and its set of patches have been marked with > "Returned with Feedback" by yourself. > >> I find the feature (atomic commit for foreign transactions) very > >> useful and it will pave the road for having a distributed transaction > management in Postgres. > >> Although we have not arrived at consensus at which approach is best, > >> there were significant reviews and major patch changes in the past 2 years. > >> By any chance, do you have any plans to continue this from where you left off? > > > > As I could not reply to the review comments from Fujii-san for almost > > three months, I don't have enough time to move this project forward at > > least for now. That's why I marked this patch as RWF. I’d like to > > continue working on this project in my spare time but I know this is > > not a project that can be completed by using only my spare time. If > > someone wants to work on this project, I’d appreciate it and am happy > > to help. > > Probably it's time to rethink the approach. The patch introduces foreign > transaction manager into PostgreSQL core, but as far as I review the patch, its > changes look overkill and too complicated. > This seems one of reasons why we could not have yet committed the feature even > after several years. > > Another concern about the approach of the patch is that it needs to change a > backend so that it additionally waits for replication during commit phase before > executing PREPARE TRANSACTION to foreign servers. Which would decrease the > performance during commit phase furthermore. > > So I wonder if it's worth revisiting the original approach, i.e., add the atomic > commit into postgres_fdw. One disadvantage of this is that it supports atomic > commit only between foreign PostgreSQL servers, not other various data > resources like MySQL. > But I'm not sure if we really want to do atomic commit between various FDWs. > Maybe supporting only postgres_fdw is enough for most users. Thought? The intention of Sawada-san's patch is grand although would be very much helpful because it accommodates possible future support of atomic commit for various types of FDWs. However, it's difficult to get the agreement altogether, as other reviewers also point out the performance of commit. Another point is that how it should work when we also implement atomic visibility (which is another topic for distributed transactions but worth considering). That said, if we're going to initially support it on postgres_fdw, which is simpler than the latest patches, we need to ensure that abnormalities and errors are properly handled and prove that commit performance can be improved, e.g. if we can commit not in serial but also possible in parallel. And if possible, although not necessary during the first step, it may put at ease the other reviewers if can we also think of the image on how to implement atomic visibility on postgres_fdw. Thoughts? Regards, Kirk Jamison
pgsql-hackers by date: