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 1er7CC-00041U-FO for pgsql-admin@arkaria.postgresql.org; Wed, 28 Feb 2018 19:15:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1er7CB-0007zN-N6 for pgsql-admin@arkaria.postgresql.org; Wed, 28 Feb 2018 19:15:19 +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 1er79j-0001Mg-Ks for pgsql-admin@lists.postgresql.org; Wed, 28 Feb 2018 19:12:47 +0000 Received: from mr28p48im-tydg10113601.me.com ([17.110.88.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1er79g-000806-Cs for pgsql-admin@lists.postgresql.org; Wed, 28 Feb 2018 19:12:46 +0000 Received: from process-dkim-sign-daemon.mr28p48im-tydg10113601.me.com by mr28p48im-tydg10113601.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0P4V00H00JZQ2U00@mr28p48im-tydg10113601.me.com> for pgsql-admin@lists.postgresql.org; Wed, 28 Feb 2018 19:12:41 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=04042017; t=1519845161; bh=BIbub/r/hxZs/yh74X2eQiUYPOeiHvwu7W+OX9f8LXQ=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=QHhS+ezSxRrwpzbvB/oiB+U+7Uqlp+EC8Zbi6nhMrEkZhne3DY+LrtwXrG0x4JPNz rzmyNz6eXq+/Tnk3jYy9IJFyidmXGClRoFcBTN7gXARZKg29TQXL3/mVhIXYaxlNXt 0N0AASmjU4g4sla50lH9dJwng3sCUCiFQlu1JoSdmhmcN/MMXK/2m3g6a1fD4ARNPw +KC+cFDeU7kGFwzYxrCvrWIryrJN1Uaam2oECA6jX67WKcs3oQ+Ib/blrsfAGVD3A0 P5HTBBgH9r4XtTBrKtspghC8RvlMfjZ63MoWjs/G9HS4G0RtWJv6BgXHaNtaDfoQdj jPUNlzkZj7W/g== Received: from icloud.com ([127.0.0.1]) by mr28p48im-tydg10113601.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0P4V00AMOK13CE00@mr28p48im-tydg10113601.me.com>; Wed, 28 Feb 2018 19:12:41 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-28_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1802280234 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: Rui DeSousa In-reply-to: <20180228135220.1cd46347@hydrogen.roaringpenguin.com> Date: Wed, 28 Feb 2018 14:12:39 -0500 Cc: pgsql-admin@lists.postgresql.org Content-transfer-encoding: quoted-printable Message-id: References: <400AC9CD-1E43-422C-A689-70BDBAFF231E@elevated-dev.com> <37C5A42B-4CDD-4F01-8F1E-1B185C1819B9@icloud.com> <20180228132620.2c882f84@hydrogen.roaringpenguin.com> <33220469-5BB2-4A40-8F56-8F4F392C95B3@icloud.com> <20180228135220.1cd46347@hydrogen.roaringpenguin.com> To: Dianne Skoll X-Mailer: Apple Mail (2.3445.5.20) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk You are dealing with a race condition. Postgres will continually attempt = to archive the same file over and over until rsync foolishly returns = success. =20 You are making the assumption that rsync removed the file? What if it = can=E2=80=99t? If you=E2=80=99re dealing with a logged filesystem and it = can=E2=80=99t log the metafile changes what happens then? What happened = when rsync core dumps?=20 Why would you not use =E2=80=9C-c=E2=80=9D? I have seen this fail = without the =E2=80=9C-c=E2=80=9D option=E2=80=A6 > On Feb 28, 2018, at 1:52 PM, Dianne Skoll = wrote: >=20 > On Wed, 28 Feb 2018 13:49:33 -0500 > Rui DeSousa wrote: >=20 >> Really? I think you really need to think about it. You are dealing >> with a race condition. >=20 > Not at all, assuming rsync is being called by PostgreSQL's = archive_command. >=20 >> You are dealing with a race condition involving filesystem metadata. >=20 > Nope. Not true. What are the things that are racing? >=20 > If you rsync data to make a base backup, then yes, use -c... but not = because > of any race condition. Instead, it's because of the coarse filesystem > timestamp granularity. >=20 > Regards, >=20 > Dianne. >=20