Re: [v15 beta] pg_upgrade failed if earlier executed with -c switch

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: [v15 beta] pg_upgrade failed if earlier executed with -c switch
Date: 2022-06-05 00:24:25
Message-ID: Ypv3uWvaPYs0I7B7@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 04, 2022 at 09:13:46AM -0500, Justin Pryzby wrote:
> Maybe that's easy enough to fix just be rearranging verify_directories() or
> make_outputdirs().

For the case, I mentioned, yes.

> But actually it seems annoying to have to remove the failed outputdir.
> It's true that those logs *can* be useful to fix whatever underlying problem,
> but I'm afraid the *requirement* to remove the failed outputdir is a nuisance,
> even outside of check mode.

Well, another error that could happen in the early code paths is
EACCES on a custom socket directory specified, and we'd still face the
same problem on a follow-up restart. Using a sub-directory structure
as Daniel and Tom mention would address all that (if ignoring EEXIST
for the BASE_OUTPUTDIR), removing any existing content from the base
path when not using --retain. This comes with the disadvantage of
bloating the disk on repeated errors, but this last bit would not
really be a huge problem, I guess, as it could be more useful to keep
the error information around.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2022-06-05 01:42:33 Re: should check interrupts in BuildRelationExtStatistics ?
Previous Message Roberto Mello 2022-06-05 00:21:07 Re: pgcon unconference / impact of block size on performance