Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gz2og-0003vA-Rx for pgsql-general@arkaria.postgresql.org; Wed, 27 Feb 2019 17:16:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gz2of-0008GH-GK for pgsql-general@arkaria.postgresql.org; Wed, 27 Feb 2019 17:16:21 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gz2of-0008GA-7q for pgsql-general@lists.postgresql.org; Wed, 27 Feb 2019 17:16:21 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gz2oc-0006NB-SH for pgsql-general@lists.postgresql.org; Wed, 27 Feb 2019 17:16:20 +0000 Received: from Davids-MacBook.local (unknown [41.169.120.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 6922254682; Wed, 27 Feb 2019 17:16:15 +0000 (UTC) Subject: Re: Barman disaster recovery solution To: Achilleas Mantzios , pgsql-general@lists.postgresql.org References: <1ttgfmod96uhh1ju7mk0f7v6.1551268542036@email.lge.com> <945fc3cf-a9dd-c594-4fb5-33e497a10190@pgmasters.net> <13f3644c-adef-9fcc-09c9-cd14dce60656@matrix.gatewaynet.com> From: David Steele Message-ID: <664640f5-d491-0cf6-9a4f-ae5b76c3584f@pgmasters.net> Date: Wed, 27 Feb 2019 19:16:12 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <13f3644c-adef-9fcc-09c9-cd14dce60656@matrix.gatewaynet.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/27/19 4:48 PM, Achilleas Mantzios wrote: > On 27/2/19 4:16 μ.μ., David Steele wrote: >> On 2/27/19 2:31 PM, Achilleas Mantzios wrote: >>> On 27/2/19 1:58 μ.μ., richter@simkorp.com.br wrote: >>>> Just to notice, I d o use backup from standby and WAL archive from >>>> standby. It is possible. But you have to configure standby with >>>> option of wal archive "always". >>> >>> I guess there are issues with it. If this was so easy then pgbarman >>> and pgbackrest would support it out of the box. >> >> There are a few issues with it: >> >> 1) If you allow the primary and standby to archive to the same >> repository then there needs to be some conflict resolution if they >> write at the same time.  If they write to different repositories then >> you need to decided which one to use for a restore, or have some kind >> of conflict resolution between them.  It gets complicated. >> >> 2) Writing only from the standby reduces load on the primary but if >> the connection to the primary is down then you can get behind on >> archiving. If something then happens to the primary then your recovery >> point will be limited. > > David to quote an older email from you: > "pgBackRest currently requires some files and all WAL to be sent from > the primary even when doing backup from standby.  We may improve this in > the future but it's not on the road map right now. " > So, I had the impression that receiving WALs from the standby was a > greater technical problem. No, it just increases the risk of being behind on archiving. One of the things pgBackRest does well is move a *lot* of WAL and it is orders of magnitude faster than streaming replication, which is single-threaded and uncompressed. So, in spite of the additional load it's generally safest to archive from the primary, especially on high write volume clusters. -- -David david@pgmasters.net