Re: remove more archiving overhead - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: remove more archiving overhead
Date
Msg-id 20220708165450.GA2356733@nathanxps13
Whole thread Raw
In response to Re: remove more archiving overhead  (David Steele <david@pgmasters.net>)
Responses Re: remove more archiving overhead
Re: remove more archiving overhead
List pgsql-hackers
On Fri, Jul 08, 2022 at 08:20:09AM -0400, David Steele wrote:
> On 7/7/22 21:56, Kyotaro Horiguchi wrote:
>> Thinking RFC'ish, the meaning of "may" and "must" is significant in
>> this description.  On the other hand it uses both "may" and "can" but
>> I thinkthat their difference is not significant or "can" there is
>> somewhat confusing.  I think the "can" should be "may" here.
> 
> +1.

Done.

>> And since "must" is emphasized, doesn't "may" also needs emphasis?
> 
> I think emphasis only on must is fine.

Yeah, I wanted to emphasize the importance of returning false in this case.
Since it's okay to return true or false in the identical/persisted file
case, I didn't think it deserved emphasis.

> Nathan, I don't see the language about being sure to persist to storage
> here?

It's here:
    When an archive library encounters a pre-existing file, it may return
    true if the WAL file has identical contents to the pre-existing archive
    and the pre-existing archive is fully persisted to storage.

Since you didn't catch it, I wonder if it needs improvement.  At the very
least, perhaps we should note that one way to do the latter is to persist
it yourself before returning true, and we could point to basic_archive.c as
an example.  However, I'm hesitant to make these docs too much more
complicated than they already are.  WDYT?

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

Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: automatically generating node support functions
Next
From: Melih Mutlu
Date:
Subject: Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication