|
From: ZhangJulian <jul...@ou...> - 2014-05-22 08:19:43
|
Hi All, I plan to implement it as the below idea. 1. add a new GUC to the coordinator configuration, which control the READ/WRITE Separation feature is ON/OFF. 2. extend the catalog table pgxc_node by adding new columns: slave1_host, slave1_port, slave1_id, slave2_host, slave2_port, slave2_id. Suppose at most two slaves are supported. 3. a read only transaction or the front read only part of a transaction will be routed to the slave node to execute. For example, begin; select ....; ==>go to slave node select ....; ==>go to slave node insert ....; ==>go to master node select ....; ==>go to master node, since it may visit the row inserted by the previous insert statement. end; By this, in a cluster, some coordinator can be configured to support the OLTP system, the query will be routed to the master data nodes; others coordinators can be configured to support the report system, the query will be routed to the slave data nodes; the different wordloads will be applied to different coordinators and data nodes, then they can be isolated. Do you think if it is valuable? Do you have some advices? Thanks Julian |