From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work |
Date: | 2022-08-09 03:10:41 |
Message-ID: | CA+hUKGKnRur_Uj6oUL1g+ffpe3-ibz0vOqYENuc0JnzWNb3htQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Working on get_dirent_type() reminded me of this thread. I was going
to commit the first of these patches, but then I noticed Andres said
he was planning to, so I'll wait another day. Here they are, with
commit messages but otherwise unchanged from Nathan's v12 except for a
slight comment tweak:
- /* we're only handling directories here, skip if it's
not ours */
+ /* we're only handling directories here, skip if it's not one */
The only hunk I'm having second thoughts about is the following, which
makes unexpected stray files break checkpoints:
- * We just log a message if a file doesn't fit the pattern, it's
- * probably some editors lock/state file or similar...
*/
if (sscanf(snap_de->d_name, "%X-%X.snap", &hi, &lo) != 2)
- {
- ereport(LOG,
+ ereport(ERROR,
(errmsg("could not parse file
name \"%s\"", path)));
Bharath mentioned other places that loop over stat(), but I think
those are places that want stuff we don't already have, like st_size.
Attachment | Content-Type | Size |
---|---|---|
v13-0001-Make-more-use-of-get_dirent_type.patch | text/x-patch | 13.1 KB |
v13-0002-Harden-errors-on-some-unexpected-filesystem-cond.patch | text/x-patch | 3.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-08-09 03:17:30 | Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work |
Previous Message | Tom Lane | 2022-08-09 03:07:49 | Re: pg15b2: large objects lost on upgrade |