From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Joe Conway <mail(at)joeconway(dot)com> |
Subject: | Re: Some regression tests for the pg_control_*() functions |
Date: | 2022-10-27 01:03:48 |
Message-ID: | Y1nY9AXypTELWi99@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 26, 2022 at 01:41:12PM +0530, Bharath Rupireddy wrote:
> We will have bigger problems when a backend corrupts the pg_control
> file, no? The bigger problems could be that the server won't come up
> or it behaves abnormally or some other.
Possibly, yes.
> Can't the CRC check detect any of the above corruptions? Do we have
> any evidence of backend corrupting the pg_control file or any of the
> above variables while running regression tests?
It could be possible that the backend writes an incorrect data
combination though its APIs, where the CRC is correct but the data is
not (say a TLI of 0, as one example).
> If the concern is backend corrupting the pg_control file and CRC check
> can't detect it, then the extra checks (as proposed in the patch) must
> be placed within the core (perhaps before writing/after reading the
> pg_control file), not in regression tests for sure.
Well, that depends on the level of protection you want. Now there are
things in place already when it comes to recovery or at startup.
Anyway, the recent experience with the 56-bit relfilenode thread is
really that we don't check the execution of these functions at all,
and that's the actual minimal requirement, so I have applied a patch
based on count(*) > 0 for now to cover that. I am not sure if any of
the checks for the control file fields are valuable, perhaps some
are..
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2022-10-27 02:06:56 | Re: GUC values - recommended way to declare the C variables? |
Previous Message | David G. Johnston | 2022-10-26 23:55:29 | Re: confused with name in the pic |