Re: pgsql: Add TAP tests for pg_verify_checksums

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Michael Banck <michael(dot)banck(at)credativ(dot)de>, 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-20 03:50:04
Message-ID: 20181020035004.7brmu7pkajlbdsp5@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers 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(dot)fsf(at)alap4(dot)lan>

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2018-10-20 04:25:19 Re: pgsql: Add TAP tests for pg_verify_checksums
Previous Message Michael Paquier 2018-10-20 03:43:00 Re: pgsql: Silence perlcritic warning about missing return.

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2018-10-20 04:24:28 Re: Function to promote standby servers
Previous Message Michael Paquier 2018-10-20 03:39:55 Re: pgsql: Add TAP tests for pg_verify_checksums