On Tue, 11 Jul 2023 at 15:11, Wen Yi <wen...@qq.com> wrote: > > Hi community, > when I learn the source of PostgreSQL, I think it's better to add a tip to > the postgres "check mode", this can help the postgres's user when they check > the postgres's data directory. > > src/backend/bootstrap/bootstrap.c > > if (check_only) > { > SetProcessingMode(NormalProcessing); > CheckerModeMain(); > abort(); > } > > Instead of > > if (check_only) > { > SetProcessingMode(NormalProcessing); > CheckerModeMain(); > printf("PostgreSQL check success, there's no problem\n"); > abort(); > }
I'm afraid I don't understand the point of your suggestion. CheckerModeMain doesn't return (it unconditionally calls proc_exit(), which doesn't return) - it shouldn't hit the abort() clause. If it did hit the abort() clause, that'd probably be a problem on its own, right? -- Kind regards, Matthias van de Meent Neon (https://neon.tech)