X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 329D2DA743 for ; Thu, 27 Oct 2005 10:25:23 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31682-05 for ; Thu, 27 Oct 2005 13:25:18 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id D119CDA72E for ; Thu, 27 Oct 2005 10:25:19 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 1DA7F4184D0; Thu, 27 Oct 2005 14:25:14 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 8682C15ED5; Thu, 27 Oct 2005 14:24:50 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09189-02; Thu, 27 Oct 2005 14:24:43 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 0ED7C15F02; Thu, 27 Oct 2005 14:21:16 +0100 (BST) Message-ID: <4360D44B.9020605@archonet.com> Date: Thu, 27 Oct 2005 14:21:15 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: mario.splivalo@mobart.hr Cc: pgsql-sql@postgresql.org Subject: Re: why vacuum References: <200510261015.17623.lawgon@thenilgiris.com> <1130339980.2872.12.camel@state.g2switchworks.com> <435FAA21.3070400@Yahoo.com> <1130401371.31435.17.camel@ekim> In-Reply-To: <1130401371.31435.17.camel@ekim> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.058 required=5 tests=[AWL=0.008, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/365 X-Sequence-Number: 23218 Mario Splivalo wrote: > On Wed, 2005-10-26 at 12:09 -0400, Jan Wieck wrote: >=20 >>You must have missed the FAQ and other side notes about replication in = >>the MySQL manual. Essentially MySQL replication is nothing but a query = >>duplicating system, with the added sugar of taking care of now() and=20 >>some other non-deterministic things, but not all of them. >> >>Non-deterministic user defined procedures, functions and triggers will = >>simply blow MySQL's sophisticated replication apart. >=20 > That is just not true. I haven't tried MySQL 4 and above, but in 3.5.x > replication wos working as expected, and the load that replication pose= d > was insignificant. The only TRUE problem was that replication was > unidirectional. That SAME problem has Slony, and other 'replication > systems' available for postgres. I think you're missing the "non-deterministic" bit. Mysql replication is = based on shipping statements AFAICT http://dev.mysql.com/doc/refman/5.0/en/binary-log.html "The binary log contains all statements which updated data or=20 potentially could have updated it (for example, a DELETE which matched=20 no rows). Statements are stored in the form of =E2=80=9Cevents=E2=80=9D t= hat describe=20 the modifications." So - if your statement contains something non-deterministic that isn't=20 catered for in Mysql's code then it will break. At it's simplest - if I write a function my_random() and then do: UPDATE foo SET a=3D1 WHERE b < my_random(); IF my_random() returns different results on different machines, then the = replication will be broken. See the manual entry below: http://dev.mysql.com/doc/refman/5.0/en/replication-features.html That's not to say the system is worthless - it works fine for many=20 people. But it does have limitations. -- Richard Huxton Archonet Ltd