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 20181020035004.7brmu7pkajlbdsp5@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-20 12:39:55 +0900, Michael Paquier wrote:
> - I agree with Stephen's point that we should decide if a file has
> checksums or not in a single place, and that we should use the same
> logic for base backups and pg_verify_checksums.

To be clear, I wholeheartedly agree on that.  We probably only want to
tackle that for "is checksummable file" in a backpatchable fashion, but
we probably should move to having more common infrastructure like that.


> So what I think we ought to do is the following:
> - Start a new thread, this one about TAP tests is not adapted.
> - Add in src/common/relpath.c the API from d55241af called
> isRelFileName(), make use of it in the base backup code, and basically
> remove is_checksummed_file() and the checksum skip list.

I think it probably shouldn't quite be that as an API.  The code should
not just check whether the file matches a pattern, but also importantly
needs to exclude files that are in a temp tablespace. isRelFileName()
doesn't quite describe an API meaning that.  I assume we should keep
something like isRelFileName() but use an API ontop of that that also
exclude temp files / relations.

Greetings,

Andres Freund
Date: Fri, 19 Oct 2018 20:48:02 -0700
Message-ID: <87in1xmg7h.fsf@alap4.lan>


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Add TAP tests for pg_verify_checksums
Next
From: Laurenz Albe
Date:
Subject: Re: Function to promote standby servers