From: Abbas B. <abb...@en...> - 2013-03-30 11:40:33
|
On Fri, Mar 29, 2013 at 3: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. > Here is what you can do. Add a column of type int in the table and distribute the table by modulo of the added column. Now if you want to specify in your query that the insert should go to first data node use value 0 for the added column, for second data node use 1 and so on. Off course a better way would be a add support for a user defined function for computing target data node in XC, but the above idea is valid for the current implementation. > > > ------------------------------------------------------------------------------ > Own the Future-Intel(R) Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. Compete > for recognition, cash, and the chance to get your game on Steam. > $5K grand prize plus 10 genre and skill prizes. Submit your demo > by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2 > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > > -- -- Abbas Architect EnterpriseDB Corporation The Enterprise PostgreSQL Company Phone: 92-334-5100153 Website: www.enterprisedb.com EnterpriseDB Blog: http://blogs.enterprisedb.com/ Follow us on Twitter: http://www.twitter.com/enterprisedb This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message. |