Re: [Patch] Make pg_checksums skip foreign tablespace directories - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [Patch] Make pg_checksums skip foreign tablespace directories
Date
Msg-id 20200218061534.GI4176@paquier.xyz
Whole thread Raw
In response to Re: [Patch] Make pg_checksums skip foreign tablespace directories  (Bernd Helmle <mailings@oopsware.de>)
Responses Re: [Patch] Make pg_checksums skip foreign tablespace directories
List pgsql-hackers
On Fri, Jan 31, 2020 at 11:33:34AM +0100, Bernd Helmle wrote:
> And to be honest, even PostgreSQL itself allows you to reuse tablespace
> locations for multiple instances as well, so the described problem
> should exist not in upgraded clusters only.

Fair point.  Now, while the proposed patch is right to use
TABLESPACE_VERSION_DIRECTORY, shouldn't we use strncmp based on the
length of TABLESPACE_VERSION_DIRECTORY instead of de->d_name?  It
seems also to me that the code as proposed is rather fragile, and that
we had better be sure that the check only happens when we are scanning
entries within pg_tblspc.

The issue with pg_internal.init.XX is quite different, so I think that
it would be better to commit that separately first.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: reindex concurrently and two toast indexes
Next
From: Michael Paquier
Date:
Subject: Re: reindex concurrently and two toast indexes