pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Bossart, Nathan <bossartn@amazon.com>
Cc: David Steele <david@pgmasters.net>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Stephen Frost <sfrost@snowman.net>
Subject: Re: archive modules
Date: Wed, 14 Sep 2022 14:09:33 -0700
Message-ID: <20220914210933.GB2984249@nathanxps13> (raw)
In-Reply-To: <43c2e879-36c9-e0e2-aacf-6c383ce1e66a@enterprisedb.com>
References: <20220203192747.GA1080581@nathanxps13>
	<CA+Tgmoa+Sp9w2CAkEJ4MuD2sAjePOmVWiYh1yDvVx4P--4ZbUg@mail.gmail.com>
	<20220203211121.GA1081379@nathanxps13>
	<CA+TgmoYDiOPrEAwzf4MAp-RPRo4TgU1MHfuDOBz-FupWfDa74A@mail.gmail.com>
	<20220203212539.GA1082940@nathanxps13>
	<CA+TgmoYE7hSUUMfNwKOzHBQ+x6Ge9ThiDbQHXCZ5ty=fGQf7YA@mail.gmail.com>
	<20220203215537.GA1123901@nathanxps13>
	<9366d634-a917-85a9-4991-b2a4859edaf9@enterprisedb.com>
	<YyFlylmDabc/eEH8@paquier.xyz>
	<43c2e879-36c9-e0e2-aacf-6c383ce1e66a@enterprisedb.com>

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.

> +   <para>
> +    It is important that the archive command return zero exit status if and
> +    only if it succeeds.  Upon getting a zero result,
> +    <productname>PostgreSQL</productname> will assume that the file has been
> +    successfully archived, and will remove or recycle it.  However, a nonzero
> +    status tells <productname>PostgreSQL</productname> that the file was not archived;
> +    it will try again periodically until it succeeds.
> +   </para>
> +
> +   <para>
> +    When the archive command is terminated by a signal (other than
> +    <systemitem>SIGTERM</systemitem> 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 <xref linkend="pg-stat-archiver-view"/>.
> +   </para>

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.

> +        <varname>archive_mode</varname> and <varname>archive_command</varname> are
> +        separate variables so that <varname>archive_command</varname> can be
> +        changed without leaving archiving mode.

I believe this applies to archive_library, too.

> -   for segments to complete like <xref linkend="guc-archive-library"/> does.
> +   for segments to complete like <xref linkend="guc-archive-command"/> and
> +   <xref linkend="guc-archive-library"/> does.

nitpick: s/does/do

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (102+ messages)  latest in thread

Message-ID: <20220914210933.GB2984249@nathanxps13>
Permalink:  ../20220914210933.GB2984249@nathanxps13/
Also on:    postgresql.org/message-id/20220914210933.GB2984249@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, peter.eisentraut@enterprisedb.com, michael@paquier.xyz, robertmhaas@gmail.com, bossartn@amazon.com, david@pgmasters.net, masao.fujii@oss.nttdata.com, magnus@hagander.net, sfrost@snowman.net
  Subject: Re: archive modules
  In-Reply-To: <20220914210933.GB2984249@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox