From: Alex H. <ale...@au...> - 2013-10-28 21:05:02
|
Hi guys, I could really use your help. I'm a sysadmin. I'm not a DBA, and I don't have any experience with PostgreSQL. I'm trying PGXC as a Cluster solution for the PGSQL DB Component in our Car's assistance infrastructure. The problem I'm currently having, is that when I try to set a foreign key in any table. "ERROR: Cannot create foreign key whose evaluation cannot be enforced to remote nodes" Koichi Suzuki says that this is current XC limitation, I tried to Change the tables distribution to "replication". I can change the layout, but the problem is when I want to add the foreign key, I get the same error. How can I do to have the keys in my system? The system has at least 10 nodes. Regards, Alex Hudson S. |
From: Ashutosh B. <ash...@en...> - 2013-10-29 06:29:22
|
Hi Alex, The error comes because, the referenced key is not guaranteed to on the same node where the row referencing it lies. Thus either of following should hold for adding a foreign key. 1. Both the tables (referenced and referencer) should be replicated on the same set of nodes 2. Both the tables should be distributed by in the same fashion on referenced and referencer columns resp. 3. The referencer table is distributed and referenced table is replicated on all the nodes where the referencer table is distributed. Koichi Suzuki says that this is current XC limitation, I tried to Change the tables distribution to "replication". I can change the layout, but the problem is when I want to add the foreign key, I get the same error. How can I do to have the keys in my system?**** > > The system has at least 10 nodes… **** > > ** ** > > Regards,**** > > ** ** > > Alex Hudson S.**** > > ** ** > > > ------------------------------------------------------------------------------ > Android is increasing in popularity, but the open development platform that > developers love is also attractive to malware creators. Download this white > paper to learn more about secure code signing practices that can help keep > Android apps secure. > http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > > -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company |
From: 鈴木 幸市 <ko...@in...> - 2013-10-29 07:35:44
|
Thanks Ashutosh for the correct answer. So far, Postgres-XC allows constraints which can be enforced without additional infrastructure, I mean, without visiting other datanodes to check if the constraint is maintained. I'm afraid Alex referred to a distributed table from replicated tables, which cannot be enforced with the current XC infrastructure. Of course, the opposite should work, referring replicated tables from a distributed table. Regards; --- Koichi Suzuki On 2013/10/29, at 15:29, Ashutosh Bapat <ash...@en...<mailto:ash...@en...>> wrote: Hi Alex, The error comes because, the referenced key is not guaranteed to on the same node where the row referencing it lies. Thus either of following should hold for adding a foreign key. 1. Both the tables (referenced and referencer) should be replicated on the same set of nodes 2. Both the tables should be distributed by in the same fashion on referenced and referencer columns resp. 3. The referencer table is distributed and referenced table is replicated on all the nodes where the referencer table is distributed. Koichi Suzuki says that this is current XC limitation, I tried to Change the tables distribution to "replication". I can change the layout, but the problem is when I want to add the foreign key, I get the same error. How can I do to have the keys in my system? The system has at least 10 nodes… Regards, Alex Hudson S. ------------------------------------------------------------------------------ Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk _______________________________________________ Postgres-xc-general mailing list Pos...@li...<mailto:Pos...@li...> https://lists.sourceforge.net/lists/listinfo/postgres-xc-general -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company ------------------------------------------------------------------------------ Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk_______________________________________________ Postgres-xc-general mailing list Pos...@li... https://lists.sourceforge.net/lists/listinfo/postgres-xc-general |