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 1erpKj-0005T3-Hi for pgsql-admin@arkaria.postgresql.org; Fri, 02 Mar 2018 18:23:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erpKi-0003Ah-KA for pgsql-admin@arkaria.postgresql.org; Fri, 02 Mar 2018 18:23:04 +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 1erpKi-0003AK-Bt for pgsql-admin@lists.postgresql.org; Fri, 02 Mar 2018 18:23:04 +0000 Received: from mr28p48im-tydg10101201.me.com ([17.110.88.44]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1erpKf-0000MI-1q for pgsql-admin@lists.postgresql.org; Fri, 02 Mar 2018 18:23:03 +0000 Received: from process-dkim-sign-daemon.mr28p48im-tydg10101201.me.com by mr28p48im-tydg10101201.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0P4Z00700711PT00@mr28p48im-tydg10101201.me.com> for pgsql-admin@lists.postgresql.org; Fri, 02 Mar 2018 18:22:57 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=04042017; t=1520014977; bh=fPbc2xD4TzfuE4lfcWTLAapuWisKsg1NWTw/2pZrDk0=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=fewwE9kn7BceJR8dtfEP3Cz/Fgm9iMqfQOGhc8XeZhX4lmZHvhXPzGEQFmi3nig3Y zHSXmV33jhB0OgCcAeYZ+6pN+VwfWav1QpGBxE5bmDeW+vJJ7tYeC9BfrGxXsj9KIo qEEv1Mt78hyY3o/so2oztHWtQkBbGf+61meblco5u9VXu9T8K2fpS5EpBiTHT96AtG vNe938BVKpPbrSKtrwiG2t6+NqMkxemeUyoOJN3jSYDBZzl+NnziFYXM4wEV5AiEI0 f3PqOxGONwt5Lsi99vdxYMiQmIlxbyc1h4oCAJ7kaVWXy1Xrl0LUPMzCz4Dm2A+PHr UbXXBMdahqMXA== Received: from icloud.com ([127.0.0.1]) by mr28p48im-tydg10101201.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0P4Z00APQ726OA30@mr28p48im-tydg10101201.me.com>; Fri, 02 Mar 2018 18:22:57 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-02_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 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-1803020217 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: <20180302180911.GO2416@tamriel.snowman.net> Date: Fri, 02 Mar 2018 13:22:53 -0500 Cc: scott ribe , Mark Kirkwood , Dianne Skoll , pgsql-admin@lists.postgresql.org Content-transfer-encoding: quoted-printable Message-id: References: <20180228132620.2c882f84@hydrogen.roaringpenguin.com> <33220469-5BB2-4A40-8F56-8F4F392C95B3@icloud.com> <21AF0CB4-0873-4960-BA14-E72FA08B352E@icloud.com> <5a49c387-e4f4-f70c-537c-9c338c80b687@catalyst.net.nz> <9DDA6F85-077E-4F8D-8708-632CC2907D3C@icloud.com> <06dd8b81-8b1a-ae5c-8ddd-1556b5946176@catalyst.net.nz> <6056907B-551F-4ED0-804B-0FCACD39EB23@icloud.com> <988AB20C-9FDE-4197-BF3F-C54D80C2ED78@elevated-dev.com> <20180302180911.GO2416@tamriel.snowman.net> To: Stephen Frost X-Mailer: Apple Mail (2.3445.5.20) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Not a problem; as you should be archiving your WALs to multiple sites = simultaneously. You=E2=80=99re DR site should not rely on any resources = stored at the primary site. > On Mar 2, 2018, at 1:09 PM, Stephen Frost wrote: >=20 > Greetings, >=20 > * Rui DeSousa (rui.desousa@icloud.com) wrote: >>> On Mar 1, 2018, at 12:21 AM, scott ribe = wrote: >>> The false report of success is not good, but it's not the root = problem. >>=20 >> A false success if a problem; especially in this use case as the = source WAL file will be deleted by Postgres before it was truly = successful. While monitoring is nice to avoid the issue it is not a fix = for the issue. >>=20 >> I personally cannot recommend the use of rsync in this application = for two reasons. =20 >=20 > There's a bigger problem that I'm amazed hasn't been brought up = already- > the rsync, copy, cp, whatever, may finish just fine and then the = system > that the WAL file was copied to crashes and you end up losing a bunch = of > WAL because none of these methods actually sync's the WAL to disk. >=20 > No archive_command should ever return success until the WAL is = actually > written out to permanent storage and sync'd. That's what tools like > pgBackRest do and is part of the reason why people really shouldn't = try > to hack up their own archive_command solution but should be using well > tested existing solutions. >=20 > Thanks! >=20 > Stephen