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 1oIk30-0003A5-Pa for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Aug 2022 05:02:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oIk2z-00064c-LJ for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Aug 2022 05:02:25 +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 1oIk2z-00064J-Bm for pgsql-hackers@lists.postgresql.org; Tue, 02 Aug 2022 05:02:25 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oIk2w-0005ud-Rb for pgsql-hackers@postgresql.org; Tue, 02 Aug 2022 05:02:24 +0000 Received: by mail-pl1-x633.google.com with SMTP id d16so4310420pll.11 for ; Mon, 01 Aug 2022 22:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OgHNiCTwt26UeZlrUrgbYQldH9EQlFDF/OzbZndBHQg=; b=cKCvuK4pmAQ9ZCApN7F6d5YQhGyM/oFg1Nd3YYf+TB2eSlVaaZakA5at+1dxJv6wrb L5DjfzyXX8E5y2+G1Z3kfrpjGdKeN2r80HTbszUImflY9fJ7k117jBGhIea5CQLd1ZVR 6M9QSgUia9kgc7xQkxFg+ZR6Rx/Sxz7T/pmfNhlXb5qpvi8Ai7a2joYCmFbtNDZZczfN jhCCbqnkTmSQ1EfrnjEsv1TChZzzT+4Pf+/WLoy2hmxGQO80NG2BgeZdJmtcj8E7hJLn jI015tgRgq0YsA9SNhBth7TdK9Fs136WZnkPsnlXHkCuQ1i21qqA4+AqqUbnnJN1Cm7O Ms1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OgHNiCTwt26UeZlrUrgbYQldH9EQlFDF/OzbZndBHQg=; b=zyLwx3BcMie+F4iqMk/n6H3bQaXm5J9YwOWev3UHjqsHm8Huz3qUxA+y1nA+guPFW/ dIJZJqVWeXfWP6UYM/gNNLC8X5EmmvF337A1H6G18zn9kUi63UYiarKydvy6/r0m7YUh WHtXPACopdvJUqxpuUOfNU195HXcxbwEBaYFhJlnEElBEJYuTCt74/ckRvApt97JImEB Rp0gJC5uap7ucFPKpq/nLpsBspSoxL1RUCO9ImyknuMtRz2mo+6QmZCuGiKf7+VTQuZc RVaMvuYnTZfuYt0f2ciY89Kg5uP9zlkiO4pgpAk693q77spIa+RUl1/23a+iArRRurf+ YoOw== X-Gm-Message-State: ACgBeo155oX4gbrkhemrF64XN5JbXqpClhqiCKuSoXmQmeTkV5SPKAnx bTlPhgK4qU6gDwGzjtR7q10= X-Google-Smtp-Source: AA6agR4XzK6UkHj4rImd6WHepoWeLX/ZXMyi0PrDoR4kJTPUtT3IdQjb7kke7dMvcS+bUdqIdrTUyQ== X-Received: by 2002:a17:90a:9409:b0:1f0:e171:f2bd with SMTP id r9-20020a17090a940900b001f0e171f2bdmr21645223pjo.245.1659416541340; Mon, 01 Aug 2022 22:02:21 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id q5-20020aa79605000000b0052d16416effsm6191287pfg.80.2022.08.01.22.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Aug 2022 22:02:20 -0700 (PDT) Date: Mon, 1 Aug 2022 22:02:19 -0700 From: Nathan Bossart To: Noah Misch Cc: David Steele , Kyotaro Horiguchi , robertmhaas@gmail.com, masao.fujii@oss.nttdata.com, pgsql-hackers@postgresql.org Subject: Re: remove more archiving overhead Message-ID: <20220802050219.GA475090@nathanxps13> 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> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20220731065156.GA3694276@rfd.leadboat.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com --opJtzjQTFsWo+cga Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="adjust_archive_docs.patch" diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index e432bb015a..cba7292f98 100644 --- 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. --opJtzjQTFsWo+cga--