diff options
author | Thomas Munro <tmunro@postgresql.org> | 2022-07-22 17:37:39 +1200 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2022-07-22 17:41:47 +1200 |
commit | 5344723755bdbb13d5271ccea181166327c63e97 (patch) | |
tree | b026da7823e2c2399e1c1fd3f10940f043bbae4b /src/backend/access/transam/xlog.c | |
parent | 9d3444dcce4d62716edec9c58c1b40be42185e7b (diff) | |
download | postgresql-5344723755bdbb13d5271ccea181166327c63e97.tar.gz postgresql-5344723755bdbb13d5271ccea181166327c63e97.zip |
Remove unnecessary Windows-specific basebackup code.
Commit c6f2f016 added an explicit check for a Windows "junction point".
That turned out to be needed only because get_dirent_type() was busted
on Windows. It's been fixed by commit 9d3444dc, so remove it.
Add a TAP-test to demonstrate that in-place tablespaces are copied by
pg_basebackup. This exercises the codepath that would fail before
c6f2f016 on Windows, and shows that it still doesn't fail now that we're
using get_dirent_type() on both Windows and Unix.
Back-patch to 15, where in-place tablespaces arrived and caused this
problem (ie directories where previously only symlinks were expected).
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CA%2BhUKGLzLK4PUPx0_AwXEWXOYAejU%3D7XpxnYE55Y%2Be7hB2N3FA%40mail.gmail.com
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 1da3b8eb2ea..15ab8d90d4b 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -8302,13 +8302,8 @@ do_pg_backup_start(const char *backupidstr, bool fast, TimeLineID *starttli_p, * we sometimes use allow_in_place_tablespaces to create * directories directly under pg_tblspc, which would fail below. */ -#ifdef WIN32 - if (!pgwin32_is_junction(fullpath)) - continue; -#else if (get_dirent_type(fullpath, de, false, ERROR) != PGFILETYPE_LNK) continue; -#endif #if defined(HAVE_READLINK) || defined(WIN32) rllen = readlink(fullpath, linkpath, sizeof(linkpath)); |