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 1oYZdj-0001dk-0g for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Sep 2022 21:09:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oYZdh-0006od-Ld for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Sep 2022 21:09:45 +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 1oYZdh-0006oT-Cb for pgsql-hackers@lists.postgresql.org; Wed, 14 Sep 2022 21:09:45 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oYZdd-0002s7-3J for pgsql-hackers@postgresql.org; Wed, 14 Sep 2022 21:09:45 +0000 Received: by mail-pl1-x636.google.com with SMTP id p18so16351674plr.8 for ; Wed, 14 Sep 2022 14:09:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=mC9LnWM9YrNkaj5IdInUpS6ZTC5r6ME6fChubLpSPnY=; b=nLC984MajADZR3NUtOfN9/Ob9JbUc5tu+hHkSrhxX8zCz2dNlA1XotXhU5HFvn2ysI TVDiUh5nJ3ZEKFlANnkyE4xsiJwD4u1Alma5Ug8oZ0LZN/3qRnq38mwQKWdWKeQ2ge84 ZxBm9rD74TpbyPdJK0lBDq8sBFyhOHLiLVOpa1NOzjrscSLZjz9LhXijh5S00mFRdk+b pq+JMorGVy8d5eAjcrOg+D7f8/+YzGyVIv2vdqx0PeaqvL4LX1sSMAwUVLKb4Xb0t15v U79BRylEVjrXHs8GYu9RBm4WxQVd3Z+E9WmbhHGyjooYQ+cfyzQxhz9xoi5YAjhkXSip wXRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=mC9LnWM9YrNkaj5IdInUpS6ZTC5r6ME6fChubLpSPnY=; b=Kv2Z0+yXwtf1qkCmKwN/9V5JkKIvc67nLv+i6hghNJjifretj0AZ4MgrW4HU9791OG EF0lhTFHwZVwBi4MhhNHukKVtWwb2xWLTJ+ScM8LWt6Dk5pwjpXPzLQli2W9VwsIpjYt MeuhPlBDeqOpamGehvozfdVfiIyhCXxSf6RJfzmUYsAmVk3vRqX482rkAMkmeyPTfhUH droWYea7e+zTlOUY5+OqA3nbTJ8xdGkoT23y+37QT843Vu0oNq3w3QgEUdunOmGZ71Tt NyddIWRwcLL50x8jxP6r30TfpWsdrVh5DJcI7qAreHEJ91kG0poBIHg1lF+94Tc6D1Ru aj0A== X-Gm-Message-State: ACrzQf3JF/6Jy+NB/AGeSQJiCBlAyKTOQXgse5yC1dVvMwcKXn0+uAqP 9YMGRDxo5YOKfEXUbsiMTbw= X-Google-Smtp-Source: AMsMyM4TI0VIlYJOs0JP/3HtUXvGfFtoU6it4rrOwnDeJDLrwGrftp5KO5DTBTnxI6Y8YAqRPIEROg== X-Received: by 2002:a17:902:f394:b0:176:b7b7:2 with SMTP id f20-20020a170902f39400b00176b7b70002mr859816ple.57.1663189779012; Wed, 14 Sep 2022 14:09:39 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id l5-20020a170902d34500b0017689960d10sm11201153plk.156.2022.09.14.14.09.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 14:09:38 -0700 (PDT) Date: Wed, 14 Sep 2022 14:09:33 -0700 From: Nathan Bossart To: Peter Eisentraut Cc: Michael Paquier , Robert Haas , "Bossart, Nathan" , David Steele , Fujii Masao , "pgsql-hackers@postgresql.org" , Magnus Hagander , Stephen Frost Subject: Re: archive modules Message-ID: <20220914210933.GB2984249@nathanxps13> References: <20220203192747.GA1080581@nathanxps13> <20220203211121.GA1081379@nathanxps13> <20220203212539.GA1082940@nathanxps13> <20220203215537.GA1123901@nathanxps13> <9366d634-a917-85a9-4991-b2a4859edaf9@enterprisedb.com> <43c2e879-36c9-e0e2-aacf-6c383ce1e66a@enterprisedb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43c2e879-36c9-e0e2-aacf-6c383ce1e66a@enterprisedb.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Sep 14, 2022 at 09:31:04PM +0200, Peter Eisentraut wrote: > Here is a patch that addresses this. My intent was to present archive_command as the built-in archive library, but I can see how this might cause confusion, so this change seems reasonable to me. > + > + It is important that the archive command return zero exit status if and > + only if it succeeds. Upon getting a zero result, > + PostgreSQL will assume that the file has been > + successfully archived, and will remove or recycle it. However, a nonzero > + status tells PostgreSQL that the file was not archived; > + it will try again periodically until it succeeds. > + > + > + > + When the archive command is terminated by a signal (other than > + SIGTERM that is used as part of a server > + shutdown) or an error by the shell with an exit status greater than > + 125 (such as command not found), the archiver process aborts and gets > + restarted by the postmaster. In such cases, the failure is > + not reported in . > + This wording is very similar to the existing wording in the archive library section below it. I think the second paragraph covers the shell command case explicitly, too. Perhaps these should be combined. > + archive_mode and archive_command are > + separate variables so that archive_command can be > + changed without leaving archiving mode. I believe this applies to archive_library, too. > - for segments to complete like does. > + for segments to complete like and > + does. nitpick: s/does/do -- Nathan Bossart Amazon Web Services: https://aws.amazon.com