Re: pgsql: Add TAP tests for pg_verify_checksums - Mailing list pgsql-hackers

From Andres Freund
Subject Re: pgsql: Add TAP tests for pg_verify_checksums
Date
Msg-id 20181012015319.ezsb2cxb52ulbqgx@alap3.anarazel.de
Whole thread Raw
In response to Re: pgsql: Add TAP tests for pg_verify_checksums  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pgsql: Add TAP tests for pg_verify_checksums  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hi,

On 2018-10-12 10:39:18 +0900, Michael Paquier wrote:
> On Thu, Oct 11, 2018 at 06:04:11PM -0700, Andres Freund wrote:
> > culicidae tests EXEC_BACKEND, so there's an explanation as to why it
> > sometimes behaves differently. But here I don't immediately see how
> > that'd matter. Probably still worth verifying that it's not somehow
> > caused by that.
> 
> Thanks, that's the point of detail I needed about culicidae

Note that that's also mentioned on the BF page when you hover over the
yellow stick-it symbol.


> (you will need to explain me one day face-to-face how you pronounce
> it).

I didn't choose it ;)

> I have been able to reproduce the problem, and that's a bug within
> pg_verify_checksums as it fails to consider that config_exec_params is
> not a file it should scan when using EXEC_BACKEND.  The same can
> happen with config_exec_params.new.

Ugh, so it's actively borked on windows right now?



> The attached, which fixes the issue for me, needs to be back-patched to
> v11.

Looks consistent with what we have rn. But:

> diff --git a/src/bin/pg_verify_checksums/pg_verify_checksums.c b/src/bin/pg_verify_checksums/pg_verify_checksums.c
> index 1bc020ab6c..a6c884f149 100644
> --- a/src/bin/pg_verify_checksums/pg_verify_checksums.c
> +++ b/src/bin/pg_verify_checksums/pg_verify_checksums.c
> @@ -54,6 +54,10 @@ static const char *const skip[] = {
>      "pg_filenode.map",
>      "pg_internal.init",
>      "PG_VERSION",
> +#ifdef EXEC_BACKEND
> +    "config_exec_params",
> +    "config_exec_params.new",
> +#endif
>      NULL,
>  };
>  

Hm. Maybe I'm confused, but how is it correct to use a blacklisting
approach here? It's far from absurd to have files inside a tablespacs
when using temp_tablespace that aren't written through the buffer
manager.  Like, uh, temp files, when using temp_tablespaces.  But even
leaving that aside, there's a few extensions that place additional files
into the tablespace directories (and we don't give them an alternative
solution).  I think at the very least you're going to need to pattern
match to relation looking files.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Add TAP tests for pg_verify_checksums
Next
From: Michael Paquier
Date:
Subject: Re: pgsql: Add TAP tests for pg_verify_checksums