Re: pg_tablespace_location() failure with allow_in_place_tablespaces

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_tablespace_location() failure with allow_in_place_tablespaces
Date: 2022-03-15 01:50:53
Message-ID: Yi/w/TITGgpNLTdF@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 15, 2022 at 02:33:17PM +1300, Thomas Munro wrote:
> Ok, I pushed the fix for pg_basebackup.
>
> As for the complaint about pg_tablespace_location() failing, would it
> be better to return an empty string? That's what was passed in as
> LOCATION. Something like the attached.

Hmm, I don't think so. The point of the function is to be able to
know the location of a tablespace at SQL level so as we don't have any
need to hardcode its location within any external tests (be it a
pg_regress test or a TAP test) based on how in-place tablespace paths
are built in the backend, so I think that we'd better report either a
relative path from data_directory or an absolute path, but not an
empty string.

In any case, I'd suggest to add a regression test. What I have sent
upthread would be portable enough.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2022-03-15 01:51:37 Re: pg_walinspect - a new extension to get raw WAL data and WAL stats
Previous Message Thomas Munro 2022-03-15 01:44:03 Re: pg_tablespace_location() failure with allow_in_place_tablespaces