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 1oZUPd-00015C-QG for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Sep 2022 09:47:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oZUPa-00046Q-Pn for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Sep 2022 09:46:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZUPZ-00046A-Fw for pgsql-hackers@lists.postgresql.org; Sat, 17 Sep 2022 09:46:58 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZUPR-0005pR-5n for pgsql-hackers@postgresql.org; Sat, 17 Sep 2022 09:46:56 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 7304A3200B72; Sat, 17 Sep 2022 05:46:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 17 Sep 2022 05:46:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663408002; x= 1663494402; bh=leVOZGEBuo/rmJp0HHPKF9Vjv6BuNQ0JVnFBYUKsvHE=; b=k fEyUz6Q4yKomLDoNZDb1arEm9k+Lfb4Y8RZQ+9dnUO3RR1v4HQqjlOUE4ffa7vPE IIGHHaL7hEbkAqKdIvaOMqq/qxKy9B5NjnhK3pbETgbdY0HSnqAXGHTPfNlGiC8+ /Mv4RHnAnQeN4cY92zqceyibYBKqWLkm9g1gygoIP4Yv5N7ua4Nq+5ycW807pXWN KrG/XehRiwN2+6ejDq/b6q2aSsCOezqaXuU1zz+TFtIYpdWJ+oQsR91b6WmvXgI4 cGy0TmbEFdJCTO9LQWHH0SlHDSl6ESnmAMYnGOyrarlpbTydaARexha6Ir2mwuWf CUAgB1E9YNCXNf3FoJSxQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvvddgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehleffgeegudejteei hfelteduvdeifffhffdvjedvffegjeekudeludehudeifeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 17 Sep 2022 05:46:40 -0400 (EDT) Message-ID: Date: Sat, 17 Sep 2022 11:46:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: remove more archiving overhead Content-Language: en-US To: Noah Misch , Nathan Bossart Cc: David Steele , Kyotaro Horiguchi , robertmhaas@gmail.com, masao.fujii@oss.nttdata.com, pgsql-hackers@postgresql.org References: <20220707182251.GA2255242@nathanxps13> <20220707220716.GA2258527@nathanxps13> <20220708.105652.1551158050191356887.horikyota.ntt@gmail.com> <44dbf5e4-8eec-da56-daba-755128b3723e@pgmasters.net> <20220708165450.GA2356733@nathanxps13> <20220731065156.GA3694276@rfd.leadboat.com> <20220802050219.GA475090@nathanxps13> <20220803071617.GA3817792@rfd.leadboat.com> From: Peter Eisentraut In-Reply-To: <20220803071617.GA3817792@rfd.leadboat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 03.08.22 09:16, Noah Misch wrote: > On Mon, Aug 01, 2022 at 10:02:19PM -0700, Nathan Bossart wrote: >> On Sat, Jul 30, 2022 at 11:51:56PM -0700, Noah Misch wrote: >>> Inviting the administrator to resolve things is more dangerous than just >>> returning true. I recommend making this text more opinionated and simpler: >>> libraries must return true. Alternately, if some library has found a good >>> reason to return false, this paragraph could give the reason. I don't know of >>> such a reason, though. >> >> Your suggestion seems reasonable to me. I've attached a small patch. > >> --- a/doc/src/sgml/backup.sgml >> +++ b/doc/src/sgml/backup.sgml >> @@ -691,11 +691,9 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0 >> system crashes before the server makes a durable record of archival success, >> the server will attempt to archive the file again after restarting (provided >> archiving is still enabled). When an archive library encounters a >> - pre-existing file, it may return true if the WAL file has >> + pre-existing file, it should return true if the WAL file has >> identical contents to the pre-existing archive and the pre-existing archive >> - is fully persisted to storage. Alternatively, the archive library may >> - return false anytime a pre-existing file is encountered, >> - but this will require manual action by an administrator to resolve. If a >> + is fully persisted to storage. If a >> pre-existing file contains different contents than the WAL file being >> archived, the archive library must return >> false. > > Works for me. Thanks. This documentation change only covers archive_library. How are users of archive_command supposed to handle this?