Re: remove more archiving overhead

From: Noah Misch <noah(at)leadboat(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, David Steele <david(at)pgmasters(dot)net>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, robertmhaas(at)gmail(dot)com, masao(dot)fujii(at)oss(dot)nttdata(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: remove more archiving overhead
Date: 2022-09-18 07:13:12
Message-ID: 20220918071312.GB1658466@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Sep 17, 2022 at 02:54:27PM -0700, Nathan Bossart wrote:
> On Sat, Sep 17, 2022 at 11:46:39AM +0200, Peter Eisentraut wrote:
> >> > --- a/doc/src/sgml/backup.sgml
> >> > +++ b/doc/src/sgml/backup.sgml
> >> > @@ -691,11 +691,9 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 &amp;&amp; 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 <literal>true</literal> if the WAL file has
> >> > + pre-existing file, it should return <literal>true</literal> 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 <literal>false</literal> 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 <emphasis>must</emphasis> return
> >> > <literal>false</literal>.
> >>
> >> Works for me. Thanks.
> >
> > 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?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2022-09-18 07:42:42 Re: is_superuser is not documented
Previous Message Michael Paquier 2022-09-18 06:42:59 Re: Removed unused param isSlice of function transformAssignmentSubscripts