Re: pg_tablespace_location() failure with allow_in_place_tablespaces

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: thomas.munro@gmail.com, pgsql-hackers@lists.postgresql.org
Date: 2022-03-08T01:28:46Z
Lists: pgsql-hackers
On Tue, Mar 08, 2022 at 10:06:50AM +0900, Kyotaro Horiguchi wrote:
> At Tue, 8 Mar 2022 10:39:06 +1300, Thomas Munro <thomas.munro@gmail.com> wrote in 
>> Thanks, you're right.  Test on a Win10 VM.  Here's a new version.

Looks fine to me.

> FYI, on Windows11, pg_basebackup didn't work correctly without the
> patch.  So this looks like fixing an undiscovered bug as well.

Well, that's not really a long-time bug but just a side effect of
in-place tablespaces because we don't use them in many test cases 
yet, is it?

>> pg_basebackup -D copy
> WARNING:  could not read symbolic link "pg_tblspc/16384": Invalid argument
> pg_basebackup: error: tar member has empty name
> 
>                1 File(s) 0 bytes
> 			   3 Dir(s)  171,920,613,376 bytes free

That's a lot of free space.
--
Michael

Commits

  1. Remove unnecessary Windows-specific basebackup code.

  2. Fix get_dirent_type() for Windows junction points.

  3. doc: Remove mention to in-place tablespaces for pg_tablespace_location()

  4. Fix pg_tablespace_location() with in-place tablespaces

  5. Fix pg_basebackup with in-place tablespaces.