Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1er4lR-0001CS-SA for pgsql-admin@arkaria.postgresql.org; Wed, 28 Feb 2018 16:39:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1er4lQ-0007k3-3d for pgsql-admin@arkaria.postgresql.org; Wed, 28 Feb 2018 16:39:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1er4lP-0007ju-ST for pgsql-admin@lists.postgresql.org; Wed, 28 Feb 2018 16:39:31 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1er4lM-0004Sy-OH for pgsql-admin@lists.postgresql.org; Wed, 28 Feb 2018 16:39:31 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 62DBD40B5A; Wed, 28 Feb 2018 16:39:26 +0000 (UTC) Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo03-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v2UJsChJyvhx; Wed, 28 Feb 2018 16:39:26 +0000 (UTC) Received: from shr-mbp-2.allegisgroup.com (unknown [216.152.106.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id A79FB40126; Wed, 28 Feb 2018 16:39:24 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: Reliable WAL file shipping over unreliable network From: scott ribe In-Reply-To: Date: Wed, 28 Feb 2018 09:38:57 -0700 Cc: pgsql-admin@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <400AC9CD-1E43-422C-A689-70BDBAFF231E@elevated-dev.com> To: =?utf-8?Q?Nagy_L=C3=A1szl=C3=B3_Zsolt?= X-Mailer: Apple Mail (2.3445.5.20) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Feb 28, 2018, at 8:46 AM, Nagy L=C3=A1szl=C3=B3 Zsolt = wrote: >=20 > Another problem with rsync might be that it does not know if a WAL = file > on the source side is growing (e.g. being written) and it might start > copy that before it is fully flushed to disk. I see this as a big > problem, but I don't have experience. You use rsync in the archive command, not by itself. Postgres does not = try to copy the file until it is ready. > E.g. move the file into the archive dir only after it has been fully > copied to the destination volume. But then we still have the problem = of > partially written files on the slave side. No, you do not have that problem at all. Given an unreliable network, you probably do want to use --partial -- Scott Ribe https://www.linkedin.com/in/scottribe/ (303) 722-0567