From: Koichi S. <koi...@gm...> - 2014-03-05 09:02:35
|
I'd like Abbas to answer why it is practical at this point ... >From the discussion of the thread, I understand that it is highly recommended to have a primary key in replicated tables. This will be in the release note and the reference document. Original patch from Mason requires a primary key, which causes some of regression test to fail and the short-term fix will make regression very dirty. In a long run, as discussed, I believe system primary key will be a solution, if no primary key is defined as user column. Regards; --- Koichi Suzuki 2014-03-05 17:39 GMT+09:00 Pavan Deolasee <pav...@gm...>: > Hi All, > > My apologies if I am raising a point which is well settled in other > discussion. I know this topic has been discussed at length, but I haven't > followed that discussion well. But the this statement in the commit log > still worries me: > > " Otherwise ctid is used, like we were using previously." > > This can never be safe for replicated tables. So why don't we just throw an > error if no primary key or unique index is defined ? Updating tables based > on ctid would definitely lead to data corruption. So why do that ? > > Thanks, > Pavan > > > ---------- Forwarded message ---------- > From: <ap...@us...> > Date: Wed, Mar 5, 2014 at 1:51 PM > Subject: [Postgres-xc-committers] Postgres-XC branch, REL1_2_STABLE, > updated. XC1_0_BETA1_PG9_1-3999-ge5466f7 > To: pos...@li... > > > Project "Postgres-XC". > > The branch, REL1_2_STABLE has been updated > via e5466f780b3da3e44c5b65e245417db1af822af2 (commit) > from 45f8541d30cfd9f7385cd83c43bcdca813b7f83a (commit) > > > - Log ----------------------------------------------------------------- > http://postgres-xc.git.sourceforge.net/git/gitweb.cgi?p=postgres-xc/postgres-xc;a=commitdiff;h=e5466f780b3da3e44c5b65e245417db1af822af2 > > commit 22fdd3506d5b3dd6a899b0e2134eb813b424c5db > Author: Koichi Suzuki <koi...@gm...> > Date: Wed Mar 5 17:18:44 2014 +0900 > > A patch to improve replicated table update/delete handling. > > This commit performs updates/deletes to replicated tables > based on either primary key or unique index under the following > conditions > > 1. The replicated table has either a primary key or a unique index > defined. > 2. The query is not changing the primary key itself. > > Otherwise ctid is used, like we were using previously. > > > > > -- > Pavan Deolasee > http://www.linkedin.com/in/pavandeolasee > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to > Perforce. > With Perforce, you get hassle-free workflows. Merge that actually works. > Faster operations. Version large binaries. Built-in WAN optimization and > the > freedom to use Git, Perforce or both. Make the move to Perforce. > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > |