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, 23 Aug 2022 11:07:44 -0700
Message-ID: <20220823180744.GD1207981@nathanxps13> (raw)
In-Reply-To: <CALj2ACXZPMYXrPZ+CUE0_5DKDnxyqDGRftSgPPx--PWhWB3RtQ@mail.gmail.com>
References: <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>
<20220816203233.GA255076@nathanxps13>
<CALj2ACXZPMYXrPZ+CUE0_5DKDnxyqDGRftSgPPx--PWhWB3RtQ@mail.gmail.com>
On Wed, Aug 17, 2022 at 12:39:26PM +0530, Bharath Rupireddy wrote:
> + /*
> + * We're only handling directories here, skip if it's not ours. Also, skip
> + * if the caller has already performed this check.
> + */
> + if (!slot_dir_checked &&
> + lstat(path, &statbuf) == 0 && !S_ISDIR(statbuf.st_mode))
> return;
There was previous discussion about removing this stanza from
ReorderBufferCleanupSeralizedTXNs() completely [0]. If that is still
possible, I think I would choose that over having callers specify whether
to do the directory check.
> + /* we're only handling directories here, skip if it's not one */
> + sprintf(path, "pg_replslot/%s", logical_de->d_name);
> + if (get_dirent_type(path, logical_de, false, LOG) != PGFILETYPE_DIR)
> + continue;
IIUC an error in get_dirent_type() could cause slots to be skipped here,
which is a behavior change.
[0] https://postgr.es/m/20220329224832.GA560657%40nathanxps13
--
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: <20220823180744.GD1207981@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