From: Abbas B. <abb...@en...> - 2013-05-07 04:51:13
|
I changed to code by creating another function and calling it right after GetRelationNodes where needed. Updated patch attached. On Tue, Apr 30, 2013 at 3:41 PM, Ashutosh Bapat < ash...@en...> wrote: > Hi Abbas, > Instead of fixing this in GetRelationNodes, we should fix it outside, by > calling GetPrefferedNode on the result returned by GetRelationNodes for > replicated tables. Please send a revised patch with this change. May be you > want to examine all callers of GetRelationNodes. > > > On Wed, Apr 24, 2013 at 10:58 PM, Abbas Butt <abb...@en...>wrote: > >> Hi, >> The test case fails if there is no primary node in the cluster. The >> following test case was producing error. >> >> CREATE TABLE tt_22 (a int, b int) distribute by replication; >> INSERT INTO tt_22 VALUES (10); >> >> In a four datanode cluster the following query plan was being produced. >> >> explain verbose SELECT * FROM tt_22 FOR UPDATE; >> QUERY >> PLAN >> >> ---------------------------------------------------------------------------- >> Data Node Scan on "__REMOTE_FQS_QUERY__" (cost=0.00..0.00 rows=0 >> width=0) >> Output: tt_22.a, tt_22.b >> Node/s: data_node_1, data_node_2, data_node_3, data_node_4 >> Remote query: SELECT a, b FROM tt_22 FOR UPDATE OF tt_22 >> (4 rows) >> >> The reason was a missing else case in GetRelationNodes. >> >> >> -- >> *Abbas* >> Architect >> >> Ph: 92.334.5100153 >> Skype ID: gabbasb >> www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> >> * >> Follow us on Twitter* >> @EnterpriseDB >> >> Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> >> >> >> ------------------------------------------------------------------------------ >> Try New Relic Now & We'll Send You this Cool Shirt >> New Relic is the only SaaS-based application performance monitoring >> service >> that delivers powerful full stack analytics. Optimize and monitor your >> browser, app, & servers with just a few lines of code. Try New Relic >> and get this awesome Nerd Life shirt! >> http://p.sf.net/sfu/newrelic_d2d_apr >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > > > -- > Best Wishes, > Ashutosh Bapat > EntepriseDB Corporation > The Postgres Database Company > -- -- *Abbas* Architect Ph: 92.334.5100153 Skype ID: gabbasb www.enterprisedb.co <http://www.enterprisedb.com/>m<http://www.enterprisedb.com/> * Follow us on Twitter* @EnterpriseDB Visit EnterpriseDB for tutorials, webinars, whitepapers<http://www.enterprisedb.com/resources-community>and more<http://www.enterprisedb.com/resources-community> |