Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 789776EF7D6 for ; Tue, 15 Nov 2011 11:59:38 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 96577-08 for ; Tue, 15 Nov 2011 15:59:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 565976EF7D5 for ; Tue, 15 Nov 2011 11:59:31 -0400 (AST) Received: from asbnvacz-mailrelay01.megapath.net ([207.145.128.243]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RQLPz-0007aS-3R for pgsql-admin@postgresql.org; Tue, 15 Nov 2011 15:59:31 +0000 Received: from mail3.sea5.speakeasy.net (mail3.sea5.speakeasy.net [69.17.117.42]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id A9295A704D2 for ; Tue, 15 Nov 2011 10:59:13 -0500 (EST) Received: (qmail 23956 invoked from network); 15 Nov 2011 15:59:12 -0000 Received: by simscan 1.4.0 ppid: 30608, pid: 28061, t: 1.4009s scanners: clamav: 0.88.2/m:52/d:10739 spam: 3.0.4 Received: from 25-76-42-72.skybeam.com (HELO [192.168.2.16]) (sribe@elevated-dev.com@[72.42.76.25]) (envelope-sender ) by mail3.sea5.speakeasy.net (qmail-ldap-1.03) with AES128-SHA encrypted SMTP for ; 15 Nov 2011 15:59:11 -0000 Subject: Re: rsync and streaming replication Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Scott Ribe In-Reply-To: Date: Tue, 15 Nov 2011 08:59:10 -0700 Cc: "[ADMIN]" Content-Transfer-Encoding: quoted-printable Message-Id: <640CEEBE-CB12-4FC9-9758-0319A49E7ACF@elevated-dev.com> References: <87pqgxf8p9.fsf@comcast.net> <639B3C52-BF6D-4CE9-A710-75D369E9607E@elevated-dev.com> <39A965E0-DE37-41F3-8D69-321419BB8B09@elevated-dev.com> To: =?iso-8859-1?Q?C=E9dric_Villemain?= X-Mailer: Apple Mail (2.1084) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.18 tagged_above=-10 required=5 tests=BAYES_00=-1.9, SARE_SPEC_REPLICA=0.72 X-Spam-Level: X-Archive-Number: 201111/77 X-Sequence-Number: 38671 On Nov 15, 2011, at 8:30 AM, C=E9dric Villemain wrote: > Seriously, I did. Is my post "just for the value : rsync --checksum is > the option to use to prevent copying of **identical files**" incorrect > ? It's at least incomplete and somewhat misleading. But I guess you could = say the same about my post; we seem to be focusing on 2 different = aspects of its behavior ;-) > OP contains "It looks that all database files do not have the same > modification date in the master node and in the slave nodes, so the > rsync copies quite all the database from the new master to the > slaves." Yes, and rsync should only be copying changed blocks in that case, of = which you are aware, but which OP did not seem to realize. > One benefit is when files are in fact identical on both side, so that > rsync does not have to process checksum for each blocks on source and > destination. (when there are few changes, we expect rsync to copy only > those few changes, with or without --checksum). Well, but it does calculate checksums on the entire contents of both = files (which takes as much I/O and about as much CPU as calculating = checksums for each block), even when timestamps & sizes are identical. For the OP's case, identical files with differing timestamps, the only = potential savings is from not exchanging checksums over the network, = which is not likely to offer any meaningful improvement in performance, = which still leaves open the question as to why rsync is so slow in that, = when we know it is usually relatively fast to sync two servers with few = differences. Would be nice to actually hear from OP regarding file sizes/counts & = network bandwidth & disks & and so on ;-) --=20 Scott Ribe scott_ribe@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice