public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
To: Bharath Rupireddy <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Bossart, Nathan <[email protected]>
Cc: Julien Rouhaud <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work
Date: Tue, 16 Aug 2022 13:32:33 -0700
Message-ID: <20220816203233.GA255076@nathanxps13> (raw)
In-Reply-To: <CALj2ACWSjE8AiJ4xaBS4ULQ8T6RevwsNhTD6yPBLugJBTD5LCw@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CA+hUKGJt5AA5ioFG118F=+kW79Rnzicp=UmKG9ea8MqfsLnatQ@mail.gmail.com>
<[email protected]>
<CALj2ACX3u2hvp=jiOZ20m0dKXxieNy=uhYfP6d1WTZh0pdso0A@mail.gmail.com>
<20220809042802.GB1440829@nathanxps13>
<CA+hUKGKPtfOW5k+O4O3_ZEKBBCitm90e3bkOU_GGcKXe5QACHQ@mail.gmail.com>
<CALj2ACVd0ukptEi5pFyeEx-nw_C9jTRvtQJvQpm0BUhOCvrH0g@mail.gmail.com>
<CA+hUKGL30BKpudMLYP++hTvK+O5DirMkwEg6yWQ9BLycKfPUvw@mail.gmail.com>
<CALj2ACWSjE8AiJ4xaBS4ULQ8T6RevwsNhTD6yPBLugJBTD5LCw@mail.gmail.com>
On Wed, Aug 10, 2022 at 03:28:25PM +0530, Bharath Rupireddy wrote:
> snprintf(path, sizeof(path), "pg_logical/mappings/%s", mapping_de->d_name);
> - if (lstat(path, &statbuf) == 0 && !S_ISREG(statbuf.st_mode))
> + if (get_dirent_type(path, mapping_de, false, LOG) != PGFILETYPE_REG)
> continue;
Previously, failure to lstat() wouldn't lead to skipping the entry. With
this patch, a failure to determine the file type will cause the entry to be
skipped. This might be okay in some places (e.g., CheckPointSnapBuild())
but not in others. For example, in CheckPointLogicalRewriteHeap(), this
could cause us to skip fsync-ing a file due to a get_dirent_type() failure,
which seems bad.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
view thread (45+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work
In-Reply-To: <20220816203233.GA255076@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox