pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bossart, Nathan <bossartn@amazon.com>
To: Dipesh Pandit <dipesh.pandit@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Andres Freund <andres@anarazel.de>
Cc: Hannu Krosing <hannuk@google.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: .ready and .done files considered harmful
Date: Mon, 16 Aug 2021 05:05:01 +0000
Message-ID: <05564140-9567-49FA-AFB5-252F5868BBCA@amazon.com> (raw)
In-Reply-To: <CAN1g5_EZB7W=+koas6yvG4huNy-bkWau9YXHQEEFN_6Y9D0igg@mail.gmail.com>
References: <32FCEE06-C094-4B3F-BA6A-CCAF90FB90E2@amazon.com>
	<20210806.102606.1567426789036874091.horikyota.ntt@gmail.com>
	<2E74AA08-9BA1-495A-B782-3D7A1B6DDBA0@amazon.com>
	<20210806.133958.962850705445445360.horikyota.ntt@gmail.com>
	<CAN1g5_EZB7W=+koas6yvG4huNy-bkWau9YXHQEEFN_6Y9D0igg@mail.gmail.com>

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



view thread (118+ messages)  latest in thread

Message-ID: <05564140-9567-49FA-AFB5-252F5868BBCA@amazon.com>
Permalink:  ../05564140-9567-49FA-AFB5-252F5868BBCA@amazon.com/
Also on:    postgresql.org/message-id/05564140-9567-49FA-AFB5-252F5868BBCA@amazon.com

 · 

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: bossartn@amazon.com, dipesh.pandit@gmail.com, horikyota.ntt@gmail.com, robertmhaas@gmail.com, jeevan.ladhe@enterprisedb.com, sfrost@snowman.net, andres@anarazel.de, hannuk@google.com
  Subject: Re: .ready and .done files considered harmful
  In-Reply-To: <05564140-9567-49FA-AFB5-252F5868BBCA@amazon.com>

* 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