Re: [Patch] Make pg_checksums skip foreign tablespace directories

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bernd Helmle <mailings(at)oopsware(dot)de>
Cc: Michael Banck <michael(dot)banck(at)credativ(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Patch] Make pg_checksums skip foreign tablespace directories
Date: 2020-02-27 06:48:21
Message-ID: 20200227064821.GB280980@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 26, 2020 at 06:02:22PM +0100, Bernd Helmle wrote:
> My feeling is that in the case we cannot successfully resolve a
> tablespace location from pg_tblspc, we should error out, but i could
> imagine that people would like to have just a warning instead.

Thanks, this patch is much cleaner in its approach, and I don't have
much to say about it except that the error message for lstat() should
be more consistent with the one above in scan_directory(). The
version for v11 has required a bit of rework, but nothing huge
either.

> I've updated the TAP test for pg_checksums by adding a dummy
> subdirectory into the tablespace directory already created for the
> corrupted relfilenode test, containing a file to process in case an
> unpatched pg_checksums is run. With the patch attached, these
> directories simply won't be considered to check.

What you have here is much more simple than the original proposal, so
I kept it. Applied and back-patched down to 11.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-02-27 07:00:24 Re: [HACKERS] WAL logging problem in 9.4.3?
Previous Message John Naylor 2020-02-27 06:41:49 Re: Use compiler intrinsics for bit ops in hash