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 1oaHvo-00052T-Bk for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Sep 2022 14:39: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 1oaHvm-000659-Ig for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Sep 2022 14:39:30 +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 1oaHvl-00064y-W8 for pgsql-hackers@lists.postgresql.org; Mon, 19 Sep 2022 14:39:30 +0000 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oaHvj-0004gO-DZ for pgsql-hackers@postgresql.org; Mon, 19 Sep 2022 14:39:28 +0000 Received: by mail-qt1-x82e.google.com with SMTP id s18so17727437qtx.6 for ; Mon, 19 Sep 2022 07:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date; bh=Y7CDKSbQpNNPmqfePstc+tEi/aNiqL2+nARKlIbXvRU=; b=H30sGuAFFgOfdTyqOF9LKpJYecROrLuvpKcFRC00DoqZS/n4te1/rzoJw/MzKHjaGR ERaY7RMzxQxdIAHATQo7Z9v7wzP9wHd+h/i1YpVjfwLFgvlb9upaGU/00UZ5xxLPQe9z WQ0N2G8ULwCMjFMKmrmSdvjBtog0OtYPrzLxk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date; bh=Y7CDKSbQpNNPmqfePstc+tEi/aNiqL2+nARKlIbXvRU=; b=J3yTf+nH5tkfKdUZxhOGj1uqp25CE6jz76myGWQFjuel6ivFV6rOfG7L/MFVIEP95y ZnCLKzSnsVy+2ETJQP6hacUkMrkz9/5S8pq9xFZ09CuoRSlJVJNbp1oEdN4uVfuRqNjq LnEusGXdKWFgzFle6iDRSIE+4xr5PDhIFQGB4Ggg325tEGmdA+1ekp7jyR5z6OxN8VIT zLHpAETrHGSL2x37RG5dDI1vMPvGg5AwVNiigHSIReeW4LAEL5dV5RJxD7eyPP/gBJwY yL8qJS15WwPZWKQ5JUdtYCNdSHYqgI3dB1aDwYnZa98ucXecR1DngaLZNgkBOKM1cwQN pJxg== X-Gm-Message-State: ACrzQf3yTi2tf4uQJYvD0sCVrNxFaWz7WsInRdUCk1g/jjsIxVOiyToQ A/pZscv4ZKXiUzPeVhPdSgpENg== X-Google-Smtp-Source: AMsMyM5QYQh3A3/EWkr6ja3z3Eq5Ybheo2GhJ72hJ+kzysEfQIKTFTeBDZ5G64P4wDQ9Suoj+G/Aig== X-Received: by 2002:a05:622a:1053:b0:35c:bab4:bd80 with SMTP id f19-20020a05622a105300b0035cbab4bd80mr15028162qte.189.1663598366354; Mon, 19 Sep 2022 07:39:26 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::2e]) by smtp.gmail.com with ESMTPSA id e12-20020ac8598c000000b0035cf5edefa6sm62963qte.56.2022.09.19.07.39.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Sep 2022 07:39:25 -0700 (PDT) Date: Mon, 19 Sep 2022 07:39:23 -0700 From: Noah Misch To: Peter Eisentraut Cc: Nathan Bossart , David Steele , Kyotaro Horiguchi , robertmhaas@gmail.com, masao.fujii@oss.nttdata.com, pgsql-hackers@postgresql.org Subject: Re: remove more archiving overhead Message-ID: <20220919143923.GA1706070@rfd.leadboat.com> References: <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> <20220917215427.GB3189289@nathanxps13> <20220918071312.GB1658466@rfd.leadboat.com> <7476bc05-3b8d-dab4-64e9-b569c54631d6@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7476bc05-3b8d-dab4-64e9-b569c54631d6@enterprisedb.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Sep 19, 2022 at 06:08:29AM -0400, Peter Eisentraut wrote: > On 18.09.22 09:13, Noah Misch wrote: > >>>This documentation change only covers archive_library. How are users of > >>>archive_command supposed to handle this? > >> > >>I believe users of archive_command need to do something similar to what is > >>described here. However, it might be more reasonable to expect > >>archive_command users to simply return false when there is a pre-existing > >>file, as the deleted text notes. IIRC that is why I added that sentence > >>originally. > > > >What makes the answer for archive_command diverge from the answer for > >archive_library? > > I suspect what we are really trying to say here is > > === > Archiving setups (using either archive_command or archive_library) should be > prepared for the rare case that an identical archive file is being archived > a second time. In such a case, they should compare that the source and the > target file are identical and proceed without error if so. > > In some cases, it is difficult or impossible to configure archive_command or > archive_library to do this. In such cases, the archiving command or library > should error like in the case for any pre-existing target file, and > operators need to be prepared to resolve such cases manually. > === > > Is that correct? I wanted it to stop saying anything like the second paragraph, hence commit d263ced. Implementing a proper archiving setup is not especially difficult, and inviting the operator to work around a wrong implementation invites damaging mistakes under time pressure.