From: Michael P. <mic...@gm...> - 2013-03-30 04:55:12
|
On Fri, Mar 29, 2013 at 7:19 PM, Kaiji Chen <ch...@im...> wrote: > Hi, > I'm working on a data partitioning project on PostgreSQL by adding a > middleware between the database cluster interface and applications that > modify the SQL statement to specific data nodes. I just find that > PostgresXC has a nice GTM that can help me do the distributed transaction > management works, I considered to transfer my project on it. > It seems the sliders ( > http://wiki.postgresql.org/images/f/f6/PGXC_Scalability_PGOpen2012.pdf) > intend that user defined table distribution is not available, but the > coordinator can choose specific data node when processing the queries, and > the table will be distributed to by default if DISTRIBUTED BY is not > specified. Then I wonder if I can specify a data node in each query and > stop the default auto distributing process. > For SELECT queries, you can use EXECUTE DIRECT: http://postgres-xc.sourceforge.net/docs/1_0_2/sql-executedirect.html The results you get might not be exact as not global query planning is not done and the query string is sent as-is. Note that you cannot use EXECUTE DIRECT with DML or the whole cluster consistency would be broken. -- Michael |