On Tue, Jun 16, 2020 at 6:43 PM Ashutosh Bapat <ashutosh.bapat....@gmail.com> wrote: > > On Tue, Jun 16, 2020 at 3:40 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > > > > > Is there some mapping between GXID and XIDs allocated for each node or > > will each node use the GXID as XID to modify the data? Are we fine > > with parking the work for global snapshots and atomic visibility to a > > separate patch and just proceed with the design proposed by this > > patch? > > Distributed transaction involves, atomic commit, atomic visibility > and global consistency. 2PC is the only practical solution for atomic > commit. There are some improvements over 2PC but those are add ons to > the basic 2PC, which is what this patch provides. Atomic visibility > and global consistency however have alternative solutions but all of > those solutions require 2PC to be supported. Each of those are large > pieces of work and trying to get everything in may not work. Once we > have basic 2PC in place, there will be a ground to experiment with > solutions for global consistency and atomic visibility. If we manage > to do it right, we could make it pluggable as well. >
I think it is easier said than done. If you want to make it pluggable or want alternative solutions to adapt the 2PC support provided by us we should have some idea how those alternative solutions look like. I am not telling we have to figure out each and every detail of those solutions but without paying any attention to the high-level picture we might end up doing something for 2PC here which either needs a lot of modifications or might need a design change which would be bad. Basically, if we later decide to use something like Global Xid to achieve other features then what we are doing here might not work. I think it is a good idea to complete the work in pieces where each piece is useful on its own but without having clarity on the overall solution that could be a recipe for disaster. It is possible that you have some idea in your mind where you can see clearly how this piece of work can fit in the bigger picture but it is not very apparent to others or doesn't seem to be documented anywhere. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com