From: Michael P. <mic...@gm...> - 2013-12-09 07:33:44
|
On Thu, Dec 5, 2013 at 11:22 AM, normandi <nor...@al...> wrote: > Hi all, > > When reading the Postgres-XC document, I got the following two questions > (the same in nature maybe :) ) > > Q1: Why XC need the GTM component? GTM needs what is called in the XC language global snapshot, that gives to every session anywhere in the cluster an image of the transactions running. This is essential to keep data consistent across the nodes and is well adapted for the definition of MVCC that sticks to PostgreSQL. > In my opinion,if a transaction is submitted at the coord node , the coord > should break it > up into a collection of subtransactions which will be submit to the > corresponding data nodes, > and the subtransaction will be resolved by datanode's local transaction > manager. And could you explain how do you manage consistency of data for replicated tables? > Coordinator can decide whether commit the transaction or not ,by means of > 2PC/3PC protocol. 2PC is already costly, and I am not going to imagine how your performance will drop particularly for replicated tables. > Q2: "same Timestamp view", how it will affect the App clients? What is > means ? When a transaction begins, the timestamp indicating when the transaction has begun is recorded on GTM as well, and is registered centrally by GTM. The same behavior applies for current_timestamp for example. clock_timestamp, on the contrary, fetch the timestamp of the local node clock. -- Michael |