Re: pgsql: Add TAP tests for pg_verify_checksums

From: Andres Freund <andres(at)anarazel(dot)de>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-19 17:17:47
Message-ID: 20181019171747.4uithw2sjkt6msne@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi,

On 2018-10-19 10:36:59 -0400, Stephen Frost wrote:
> * Michael Paquier (michael(at)paquier(dot)xyz) wrote:
> > On Wed, Oct 17, 2018 at 05:30:05PM -0400, Andrew Dunstan wrote:
> > > Fine by me.
> >
> > Thanks. This is now committed after some tweaks to the comments, a bit
> > earlier than I thought first.
>
> I just saw this committed and I'm trying to figure out why we are
> creating yet-another-list when it comes to deciding what should be
> checksum'd and what shouldn't be.

I'm not sure it's fair to blame Michael here. He's picking up slack,
because the original authors of the tool didn't even bother to reply to
the issue for quite a while. pg_verify_checksum was obviously never
tested on windows, it just didn't have tests showing that.

> I also categorically disagree with the notion that it's ok for
> extensions to dump files into our tablespace diretories or that we
> should try to work around random code dumping extra files in the
> directories which we maintain- it's not like this additional code will
> actually protect us from that, after all, and it's foolish to think we
> really could protect against that.

I'm unconvinced. There already are extensions doing so, and it's not
like we've given them any sort of reasonable alternative. You can't just
create relations in a "registered" / "supported" kinda way right now, so
uh, yea, extension gotta make do. And that has worked for many years.

Also, as made obvious here, it's pretty clear that there's platform
differences about which files exists and which don't, so it's not that a
blacklist approach automatically is more maintainable.

And I fail to see why a blacklist is architecturally better. There's
plenty cases where we might want to create temporary files,
non-checksummed data or such that we'd need a teach a blacklist about,
but there's far fewer cases where add new checksummed files. Basically
never since checksums have been introduced. And if checksums were
introduced for something new, say slrus, we'd ceertainly use
pg_verify_checksum during development.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2018-10-19 17:52:28 Re: pgsql: Add TAP tests for pg_verify_checksums
Previous Message Stephen Frost 2018-10-19 15:17:32 Re: pgsql: Add TAP tests for pg_verify_checksums

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexey Kondratov 2018-10-19 17:49:34 [Patch] pg_rewind: options to use restore_command from recovery.conf or command line
Previous Message Stephen Frost 2018-10-19 15:17:32 Re: pgsql: Add TAP tests for pg_verify_checksums