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 1gjoph-0004z3-Rp for pgsql-admin@arkaria.postgresql.org; Wed, 16 Jan 2019 17:18:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gjopg-0000m6-G0 for pgsql-admin@arkaria.postgresql.org; Wed, 16 Jan 2019 17:18:28 +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 1gjopg-0000lz-8Y for pgsql-admin@lists.postgresql.org; Wed, 16 Jan 2019 17:18:28 +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 1gjopd-00026O-Q8 for pgsql-admin@lists.postgresql.org; Wed, 16 Jan 2019 17:18:27 +0000 Received: from Davids-MacBook.local (unknown [172.56.31.217]) (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 1364E54663; Wed, 16 Jan 2019 17:18:20 +0000 (UTC) Subject: Re: Backup solution over unreliable network To: Achilleas Mantzios , pgsql-admin@lists.postgresql.org, Stephen Frost References: <20181130120613.GW3415@tamriel.snowman.net> <6834c573-2a52-dd63-0264-5fc7258e7857@matrix.gatewaynet.com> <20181130152931.GY3415@tamriel.snowman.net> <88ba3c9e-eb96-8567-3c35-c3fdb85c1048@matrix.gatewaynet.com> <57ee3c7c-284e-d847-49f3-1a1d28d3540d@pgmasters.net> <78d8f90a-7745-743f-53a2-547d6aa551c8@matrix.gatewaynet.com> From: David Steele Message-ID: <4f415a70-2cd8-2c8f-bcb0-6a6edd666f61@pgmasters.net> Date: Wed, 16 Jan 2019 19:18:15 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <78d8f90a-7745-743f-53a2-547d6aa551c8@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 1/16/19 10:52 AM, Achilleas Mantzios wrote: > Hello David, Stephen, All and HPNY > On 30/11/18 6:50 μ.μ., David Steele wrote: >> >> Multiple stanzas are tricky to configure if async archiving is in use, >> otherwise it is relatively straightforward.  You just need two >> configuration files and each archive command will need one explicitly >> configured (--config). >> >> If async archiving is enabled then each stanza will also need a >> separate spool directory.  This configuration has never been tested >> and I recommend against it. > Just tested finished backing up our 1.2T logical subscriber test node DB > ! With a deliberate interrupt and with --resume --process-max=4 and it > worked just great! > On our production primary/physical standby cluster I want to retain our > (primitive) local backup/archive functionality, which we do via : > archive_command = /usr/bin/rsync -a --delay-updates %p > sma:/smadb/pgsql/pitr/%f > and instead of using a second local pgbackrest repo, just combine > archive_command asis with pgbackrest to the remote repo with something > like : > archive_command = /usr/bin/rsync -a --delay-updates %p > sma:/smadb/pgsql/pitr/%f && pgbackrest --stanza=dynacom > --archive-push-queue-max=50G archive-push %p > I read the code and saw that --archive-push-queue-max works even when > not in async mode (default push). We are not planning for async at this > early stage. Do you see and potential problem with the above? This seems reasonable since there is only one pgBackRest archive command. If you do eventually decide you need async then the rsync command will become a major bottleneck -- pgBackRest is simply much faster than rsync. >> 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. > > We are planning to backup from the physical standby, but as you said the > archive_command would be running from the primary. We haven't seen any issue with this configuration. If WAL rates are high then replication will likely lag whereas pgBackRest can keep up with higher WAL rates using parallel async archiving on the primary. This certainly consumes valuable primary resources but is the best way to keep up-to-date. Regards, -- -David david@pgmasters.net