Re: [Patch] Make pg_checksums skip foreign tablespace directories

Bernd Helmle <mailings@oopsware.de>

From: Bernd Helmle <mailings@oopsware.de>
To: Michael Paquier <michael@paquier.xyz>
Cc: Michael Banck <michael.banck@credativ.de>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2020-02-26T17:02:22Z
Lists: pgsql-hackers

Attachments

Am Dienstag, den 25.02.2020, 11:33 +0900 schrieb Michael Paquier:
> I really think that
> we should avoid duplicating the same logic around, and that we should
> remain consistent with non-directory entries in those paths,
> complaining with a proper failure if extra, unwanted files are
> present.

Okay, please find an updated patch attached.

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.

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.

Thanks,

	Bernd

Commits

  1. Skip foreign tablespaces when running pg_checksums/pg_verify_checksums

  2. Add prefix checks in exclude lists for pg_rewind, pg_checksums and base backups