Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9Gi8-00056q-58 for pgsql-admin@arkaria.postgresql.org; Mon, 30 Oct 2017 20:31:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e9Gi7-0002cx-FF for pgsql-admin@arkaria.postgresql.org; Mon, 30 Oct 2017 20:31:03 +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.84_2) (envelope-from ) id 1e9Gi6-0002cL-Dr for pgsql-admin@postgresql.org; Mon, 30 Oct 2017 20:31:02 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([2404:130:4080::4]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e9Gi1-0001K8-Ft for pgsql-admin@postgresql.org; Mon, 30 Oct 2017 20:31:01 +0000 Received: from localhost (localhost [127.0.0.1]) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTP id CE7FE80A6C for ; Tue, 31 Oct 2017 09:30:49 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at cat-porwal-prod-mail1.servers.catalyst.net.nz Received: from cat-porwal-prod-mail1.catalyst.net.nz ([127.0.0.1]) by localhost (cat-porwal-prod-mail1.servers.catalyst.net.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 118OMhbbxTtO for ; Tue, 31 Oct 2017 09:30:48 +1300 (NZDT) Received: from [IPv6:2406:e001:c36:1:d2d:3684:ddd0:9db0] (unknown [IPv6:2406:e001:c36:1:d2d:3684:ddd0:9db0]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id 5E98E80A81 for ; Tue, 31 Oct 2017 09:30:48 +1300 (NZDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catalyst.net.nz; s=catalyst; t=1509395448; bh=rz9fukwY0vykZMbIh6g17FqqVNa0BPY72tY14vb69tg=; h=Subject:To:References:From:Date:In-Reply-To; b=gn5XitnBh+ShQ3QMHT/b0M/xAwg2Ukx9hI/D9afX6pbw7tfuc1qy44H1N87ksJcDC tw1o+oW/VuF0MF+tHJivI7jqS78iwNRs4kt78YKKW1fcVucE8eKSGbKtcE2GA+R1Ol dNmNIkx0YG1yzhWoFLQT0N400deByMiLSdPAeSTw= Subject: Re: Bad recovery: no pg_xlog/RECOVERYXLOG To: pgsql-admin@postgresql.org References: <1070071508952614@web46j.yandex.ru> <20171030154706.GE4628@tamriel.snowman.net> From: Mark Kirkwood Message-ID: <7966ee9e-2241-eced-4639-e32c157b915a@catalyst.net.nz> Date: Tue, 31 Oct 2017 09:30:48 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171030154706.GE4628@tamriel.snowman.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On 31/10/17 04:47, Stephen Frost wrote: > Greetings, > > * Marcin Koziej (marcin@cahoots.pl) wrote: >> Now it's fixed, but if anyone needs I'm attaching all scripts to 1) >> backup and restore wal's and 2) backup and restore base backup from >> OpenStack SWIFT > Interesting, but these scripts seem to be seriously lacking in error > checking (what happens if the copy to swift fails..? or pg_basebackup > fails?) and it's unclear how you can be sure that the WAL file has been > sync'd to disk which is important or you might end up having holes in > your WAL stream if the swift system fails. There's also no checking to > make sure that the WAL needed for a given pg_basebackup ever actually > made it to the swift system, which is required to ensure you have a > consistent backup. > > Generally speaking, these kinds of scripts really aren't a good choice > for doing backups of PG. I'd strongly suggest you look at one of the > existing tools which are developed specifically for doing backups of PG > and are well tested, supported, and maintained. If you'd like support > for a new storage system, I know that at least pgBackRest's storage > layer is pluggable and adding a new storage option is pretty straight > forward. > > I'm not convinced that his approach is bad. The script checks the result of the 'swift upload' for the base backup, it is the wal backup one that does not explicitly check the 'swift upload' result (this should really be added). To be fair, anything wrong with the swift system will likely be discovered immediately beforehand where he does a 'swift stat'! I'd guess his original problem was an improperly setup recovery.conf, rather than the overall design. regards Mark -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin