Re: pgsql: Add TAP tests for pg_verify_checksums
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andrew Dunstan <andrew.dunstan@2ndquadrant.com>, Stephen Frost <sfrost@snowman.net>, Michael Banck <michael.banck@credativ.de>, Postgres hackers <pgsql-hackers@postgresql.org>, Daniel Gustafsson <daniel@yesql.se>, Magnus Hagander <magnus@hagander.net>
Date: 2018-10-20T03:50:04Z
Lists: 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>
Commits
-
Fix issues with TAP tests of pg_verify_checksums
- 9685d7383ab4 12.0 landed
-
Use whitelist to choose files scanned with pg_verify_checksums
- cc7f27eae888 11.1 landed
- d55241af7056 12.0 landed
-
Add TAP tests for pg_verify_checksums
- b34e84f160a4 12.0 cited
-
Work around Msys weakness in Testlib.pm's command_like()
- efd7f8e36553 10.0 cited