Re: pgsql: Add TAP tests for pg_verify_checksums

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Postgres hackers <pgsql-hackers(at)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: pgsql: Add TAP tests for pg_verify_checksums
Date: 2018-10-12 02:07:58
Message-ID: 20181012020758.GB30064@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Oct 11, 2018 at 06:53:19PM -0700, Andres Freund wrote:
> On 2018-10-12 10:39:18 +0900, Michael Paquier wrote:
>> 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?

It looks so. Automated testing proves to be useful sometimes.

> 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.

pg_verify_checksums assumes that the cluster has been cleanly shut
down so temp files are not an issue, no? However...

> 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).

This is a good argument. I have not played much with such extensions
myself though.

> I think at the very least you're going to need to pattern match to
> relation looking files.

Yes, it seems so. A whitelist approach would consist in checking for
relfilenodes, VMs and FSMs as files authorized for scan, in a way rather
similar to what looks_like_temp_rel_name() does for temp files...
--
Michael

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2018-10-12 02:41:18 Re: pgsql: Add TAP tests for pg_verify_checksums
Previous Message Andres Freund 2018-10-12 01:53:19 Re: pgsql: Add TAP tests for pg_verify_checksums

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-10-12 02:41:18 Re: pgsql: Add TAP tests for pg_verify_checksums
Previous Message Andres Freund 2018-10-12 01:53:19 Re: pgsql: Add TAP tests for pg_verify_checksums