Re: pg_tablespace_location() failure with allow_in_place_tablespaces
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-03-15T01:50:53Z
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
Commits
-
Remove unnecessary Windows-specific basebackup code.
- 202b56ba91cb 15.0 landed
- 5344723755bd 16.0 landed
-
Fix get_dirent_type() for Windows junction points.
- fee0165fc1cf 14.5 landed
- 6d306ab73168 15.0 landed
- 9d3444dcce4d 16.0 landed
-
doc: Remove mention to in-place tablespaces for pg_tablespace_location()
- 7a7cd84893e0 15.0 landed
-
Fix pg_tablespace_location() with in-place tablespaces
- f6f0db4d6240 15.0 landed
-
Fix pg_basebackup with in-place tablespaces.
- c6f2f01611d4 15.0 landed