Re: .ready and .done files considered harmful - Mailing list pgsql-hackers

From Bossart, Nathan
Subject Re: .ready and .done files considered harmful
Date
Msg-id 05564140-9567-49FA-AFB5-252F5868BBCA@amazon.com
Whole thread Raw
In response to Re: .ready and .done files considered harmful  (Dipesh Pandit <dipesh.pandit@gmail.com>)
Responses Re: .ready and .done files considered harmful
List pgsql-hackers
On 8/15/21, 9:52 PM, "Bossart, Nathan" <bossartn@amazon.com> wrote:
> +     * Perform a full directory scan to identify the next log segment. There
> +     * may be one of the following scenarios which may require us to perform a
> +     * full directory scan.
> ...
> +     * - The next anticipated log segment is not available.
>
> I wonder if we really need to perform a directory scan in this case.
> Unless there are other cases where the .ready files are created out of
> order, I think this just causes an unnecessary directory scan every
> time the archiver catches up.

Thinking further, I suppose this is necessary for when lastSegNo gets
reset after processing an out-of-order .ready file.

Nathan


pgsql-hackers by date:

Previous
From: "Bossart, Nathan"
Date:
Subject: Re: .ready and .done files considered harmful
Next
From: Amit Kapila
Date:
Subject: Re: Skipping logical replication transactions on subscriber side