Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D1D649FA49E for ; Fri, 5 Jan 2007 06:42:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 31628-05 for ; Fri, 5 Jan 2007 06:42:31 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from bugaboo.mu (ns1.bugaboo.mu [213.133.111.57]) by postgresql.org (Postfix) with ESMTP id 09B0B9FA48F for ; Fri, 5 Jan 2007 06:42:30 -0400 (AST) Received: from [192.168.0.237] (berlin.programmfabrik.de [::ffff:213.221.101.147]) (AUTH: CRAM-MD5 markus@bluegap.ch) by bugaboo.mu with esmtp; Fri, 05 Jan 2007 11:42:28 +0100 id 02438604.459E2B95.00004728 Message-ID: <459E2B94.2020103@bluegap.ch> Date: Fri, 05 Jan 2007 11:42:28 +0100 From: Markus Schiltknecht User-Agent: Icedove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: anorganic anorganic CC: pgsql-admin@postgresql.org Subject: Re: Replication References: <459CC52A.4030208@bluegap.ch> <459CD1D1.8010002@bluegap.ch> <459CEC50.6030407@bluegap.ch> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/30 X-Sequence-Number: 24186 Hi, [ please keep CCing to the list (reply all), as this certainly isn't a personal discussion and could help others. ] anorganic anorganic wrote: > my opinion: > partitioning is vertical and horizontal, dived table into two or more > parts. > > replicated only part of some object,here table = replicated two columns > ins't partitioning, because table is same ;) and have one part = self table > ;) The main point is, you divide data *somehow* into partitions and grant write rights to only *one* server for each partition, thus allowing you to use a simpler master-slave replication. > i want have > s1 and s2 > tableA > col1 > col2 > col3 > > tableA is on s1 and s2 same design > s1 change only col1, s2 change only col3 > is possible set replication on s1 only for col1 of tableA > is possible set replication on s2 only for col3 of tableA > > this is not partitioning i think How else would you call it? In what way is it different from what's commonly known as vertical partitioning? Couldn't you do what you want with the help of ordinary vertical partitioning and using a VIEW viewA with all the columns col1, col2, col3? > ok, sync is not saying something about when is transaction log send... Uhm.. yes it does. It has to be sent before commit confirmation is sent to the client (Postgres-R does some optimization here, but basically the above statement still holds true). It is the async approach, which doesn't say anything about when changes are sent to other servers. > sync said: i coimmit transaction when all slaves send me commit :) > asynch: i make change i commit this change and i send it to my slave. and i > want do it fast as possible ;) No matter *how* fast you do that, conflicts can arise if you don't prevent them somehow. The requirement to send changes as fast as possible in async replication rings my alarm bell, because it sounds like your application cannot cope with conflicts and wants to prevent them by minimizing the propagation delays. That's prone to race conditions and probably won't work. However, if you partition your data vertically and do per-table master-slave replication, you of course don't have to worry about conflicts, as there is only exactly one master. Regards Markus