Re: [PATCH]Add a tip to the check mode

From: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
To: Wen Yi <wen-yi(at)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH]Add a tip to the check mode
Date: 2023-07-11 13:44:39
Message-ID: CAEze2WguW_xO-4=8X-4GDz=XN2oKoswa+TgG200Nnwd+hh9-Dg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 11 Jul 2023 at 15:11, Wen Yi <wen-yi(at)qq(dot)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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2023-07-11 13:47:48 Re: [Question] Can someone provide some links related to the MemoryContext?
Previous Message Ranier Vilela 2023-07-11 13:29:14 Re: POC, WIP: OR-clause support for indexes