Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 58EA31FD99AA for ; Mon, 14 Nov 2011 14:15:21 -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 91663-10 for ; Mon, 14 Nov 2011 18:15:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from asbnvacz-mailrelay01.megapath.net (asbnvacz-mailrelay01.megapath.net [207.145.128.243]) by mail.postgresql.org (Postfix) with ESMTP id 0A3C11FD99A9 for ; Mon, 14 Nov 2011 14:15:15 -0400 (AST) Received: from mail7.sea5.speakeasy.net (mail7.sea5.speakeasy.net [69.17.117.52]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 8F0F6A72378 for ; Mon, 14 Nov 2011 13:15:14 -0500 (EST) Received: (qmail 5017 invoked from network); 14 Nov 2011 18:15:13 -0000 Received: by simscan 1.4.0 ppid: 13602, pid: 14003, t: 1.2916s scanners: clamav: 0.88.2/m:52/d:13513 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 mail7.sea5.speakeasy.net (qmail-ldap-1.03) with AES128-SHA encrypted SMTP for ; 14 Nov 2011 18:15:12 -0000 Subject: Re: rsync and streaming replication Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Scott Ribe In-Reply-To: Date: Mon, 14 Nov 2011 11:15:10 -0700 Cc: "[ADMIN]" Content-Transfer-Encoding: quoted-printable Message-Id: <1B7A9CF6-33A8-43CA-9D55-2ED9F0A69CB9@elevated-dev.com> References: <87pqgxf8p9.fsf@comcast.net> To: Jean-Armel Luce 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/71 X-Sequence-Number: 38665 I think there have been two similar threads recently, and I want to be = sure I'm not confusing them. So: - How large is the db? By which I mean how much disk space does the data = directory occupy? - What's the bandwidth of the network connection to the distant slave? - What's the CPU & disk on each end? On Nov 14, 2011, at 10:59 AM, Jean-Armel Luce wrote: > For example, the rsync commands I am using are for data and logs are = (I have 2 databases, 1 tablespace per database): > rsync -a /var/opt/hosting/db/slony/pg_xlog/* = slave-db01.profiles.bench.pns-si.s1.p.fti.net:/var/opt/hosting/db/slony/pg= _xlog/ > rsync -a /var/opt/hosting/db/profiles/bench/* = slave-db01.profiles.bench.pns-si.s1.p.fti.net:/var/opt/hosting/db/profiles= /bench/ > rsync -a /var/opt/hosting/db/profiles/profiles/* = slave-db01.profiles.bench.pns-si.s1.p.fti.net:/var/opt/hosting/db/profiles= /profiles/ Well, there's one error. Your command is rsync'ing each file = individually, so of course each file is sync'd. Sync the directories = instead--in other words leave off the * (but not the /) and let rsync = decide which files need sync'ing. --=20 Scott Ribe scott_ribe@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice