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-18 06:15:34
Message-ID: 20200218061534.GI4176@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-02-18 06:19:13 Re: reindex concurrently and two toast indexes
Previous Message Julien Rouhaud 2020-02-18 06:06:25 Re: reindex concurrently and two toast indexes