[PATCH]Add a tip to the check mode

From: Wen Yi <wen-yi(at)qq(dot)com>
To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [PATCH]Add a tip to the check mode
Date: 2023-07-11 07:45:47
Message-ID: tencent_A8FDAB49A68A90F171166E30D2982E507508@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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)
&nbsp;&nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; SetProcessingMode(NormalProcessing);
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; CheckerModeMain();
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; abort();
&nbsp;&nbsp; &nbsp;}

Instead of

if (check_only)
&nbsp;&nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; SetProcessingMode(NormalProcessing);
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; CheckerModeMain();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf("PostgreSQL check success, there's no problem\n");

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; abort();
&nbsp;&nbsp; &nbsp;}

Yours,
Wen Yi

Attachment Content-Type Size
Add-a-tip-to-the-check-mode.patch application/octet-stream 330 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2023-07-11 07:49:11 Re: unrecognized node type while displaying a Path due to dangling pointer
Previous Message Michael Paquier 2023-07-11 07:45:26 Re: Support to define custom wait events for extensions