Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nS5Su-0000aW-Bz for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Mar 2022 23:11:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nS5Ss-0004nZ-Ch for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Mar 2022 23:11:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nS5Ss-0004nP-3u for pgsql-hackers@lists.postgresql.org; Wed, 09 Mar 2022 23:11:30 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nS5Sl-0003PX-Kv for pgsql-hackers@lists.postgresql.org; Wed, 09 Mar 2022 23:11:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0JX990cxFa0ehBlFM32NJObH7LkVn3ZgDZaXsUzr4/Y=; b=Vqd2O2LYp8TKOxAbZzUpUuHwDv 6JOn9GfnP+6Q6LFcG1Nxzk9Kl8BTkj6BOfmVc3f7QNqS8LgQ5ZRKwsmbpzUxFOhGaTfbB3G9V0uVy YrfdWAaZ8ZTR/tuMZo/3bZQji2jriUNr51nHLOpJbY1yM54BqRTHTCzWJVmQBnN7n7eLa+P6b4aXX jT8uD+v896gnGB7YgV5kTPk5YgA/zjTG0vhxKT1+/SpF6i+4nrlWrOEiob864mA7g8wJYw/TxjZij RPPsGFq3b3mxgrmX44O/z46uWiECf9dIfQehHQ94bE6d3Uj7+wev9NqNYQrAlS1scD7yMdu6u2Jwe nvs4voNQ==; Received: from [184.19.43.81] (port=49698) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1nS5Si-00B1hF-S8; Wed, 09 Mar 2022 18:11:21 -0500 Subject: Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file To: Nathan Bossart References: <621FC447.90502@anastigmatix.net> <20220308200107.GA85558@nathanxps13> <20220308221253.GA169440@nathanxps13> <622801BD.9020605@anastigmatix.net> <20220309154209.GU10577@tamriel.snowman.net> <6228DFE7.4080802@anastigmatix.net> <20220309171923.GV10577@tamriel.snowman.net> <622900C8.40807@anastigmatix.net> <20220309222124.GB180567@nathanxps13> Cc: Stephen Frost , Magnus Hagander , David Steele , pgsql-hackers@lists.postgresql.org From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <62293417.8070104@anastigmatix.net> Date: Wed, 9 Mar 2022 18:11:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <20220309222124.GB180567@nathanxps13> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 03/09/22 17:21, Nathan Bossart wrote: > Great. Is there any additional feedback on this patch? Should we add an > example of using pg_basebackup in the "Standalone Hot Backups" section, or > should we leave all documentation additions like this for Chap's new > thread? I'm composing something longer for the new thread, but on the way I noticed something we might fit into this one. I think the listitem In the same connection as before, issue the command: SELECT * FROM pg_backup_stop(true); would be clearer if it used named-parameter form, wait_for_archive => true. This is not strictly necessary, of course, for a function with a single IN parameter, but it's good documentation (and also could save us headaches like these if there is ever another future need to give it more parameters). That listitem doesn't say anything about what the parameter means, which is a little weird, but probably ok because the next listitem does go into it in some detail. I don't think a larger reorg is needed to bring that language one listitem earlier. Just naming the parameter is probably enough to make it less puzzling (or adding in that listitem, at most, "the effect of the wait_for_archive parameter is explained below"). For consistency (and the same futureproofing benefit), I'd go to fast => false in the earlier pg_backup_start as well. I'm more ambivalent about label => 'label'. It would be consistent, but should we just agree for conciseness that there will always be a label and it will always be first? You can pretty much tell in a call what's a label; it's those anonymous trues and falses that are easier to read with named notation. Regards, -Chap