From: Ashutosh B. <ash...@en...> - 2013-02-25 05:21:27
|
Oh, BTW, I had run regression before committing the fix, but it didn't catch this crash. One reason is we do not have PG tests running for replicated tables. But in this specific case, may be we should add a test in xc_misc or something. On Mon, Feb 25, 2013 at 10:48 AM, Ashutosh Bapat < ash...@en...> wrote: > Thanks a lot Abbas for this quick fix. > > I am sorry, it's caused by my refactoring of GetRelationNodes(). > > If possible, can you please examine the other callers of > GetRelationNodes() which would face the problems, esp. the ones for DML and > utilities. This is other instance, where deciding the nodes to execute on > at the time of execution will help. > > About the fix > Can you please use GetPreferredReplicationNode() instead of > list_truncate()? It will pick the preferred node instead of first one. If > you find more places where we need this fix, it might be better to create a > wrapper function and use it at those places. > > On Sat, Feb 23, 2013 at 2:59 PM, Abbas Butt <abb...@en...>wrote: > >> Hi, >> PFA a patch to fix a crash when COPY TO is used on a replicated table. >> >> This test case produces a crash >> >> create table tab_rep(a int, b int) distribute by replication; >> insert into tab_rep values(1,2), (3,4), (5,6), (7,8); >> COPY tab_rep (a, b) TO stdout; >> >> Here is a description of the problem and the fix >> In case of a read from a replicated table GetRelationNodes() >> returns all nodes and expects that the planner can choose >> one depending on the rest of the join tree. >> In case of COPY TO we should choose the first one in the node list >> This fixes a system crash and makes pg_dump work fine. >> >> -- >> 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. >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_feb >> _______________________________________________ >> Postgres-xc-developers mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers >> >> > > > -- > Best Wishes, > Ashutosh Bapat > EntepriseDB Corporation > The Enterprise Postgres Company > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Enterprise Postgres Company |