Re: pg_tablespace_location() failure with allow_in_place_tablespaces
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: michael@paquier.xyz
Cc: pgsql-hackers@lists.postgresql.org
Date: 2022-03-04T09:04:00Z
Lists: pgsql-hackers
At Fri, 04 Mar 2022 17:28:45 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in > > By the way, regardless of the patch, I got an error from pg_basebackup > > for an in-place tablespace. pg_do_start_backup calls readlink > > believing pg_tblspc/* is always a symlink. > > > > # Running: pg_basebackup -D /home/horiguti/work/worktrees/tsp_replay_2/src/test/recovery/tmp_check/t_029_replay_tsp_drops_primary1_data/backup/my_backup -h /tmp/X8E4nbF4en -p 51584 --checkpoint fast --no-sync > > WARNING: could not read symbolic link "pg_tblspc/16384": Invalid argument > > So now we know that there are three places that needs the same > processing. > > pg_tablespace_location: this patch tries to fix > sendDir: it already supports in-place tsp > do_pg_start_backup: not supports in-place tsp yet. And I made a quick hack on do_pg_start_backup. And I found that pg_basebackup copies in-place tablespaces under the *current directory*, which is not ok at all:( regards. -- Kyotaro Horiguchi NTT Open Source Software Center
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