option -T in pg_basebackup doesn't work on windows - Mailing list pgsql-hackers

From Amit Kapila
Subject option -T in pg_basebackup doesn't work on windows
Date
Msg-id CAA4eK1LgjvsB7cj09LTD5ZEPQS7T48CJWt7w_BZ0kNvg5pFm4A@mail.gmail.com
Whole thread Raw
Responses Re: option -T in pg_basebackup doesn't work on windows  ("MauMau" <maumau307@gmail.com>)
List pgsql-hackers
During my recent work on pg_basebackup, I noticed that
-T option doesn't seem to work on Windows.
The reason for the same is that while updating symlinks
it doesn't consider that on Windows, junction points can
be directories due to which it is not able to update the
symlink location.
Fix is to make the code work like symlink removal code
in destroy_tablespace_directories.  Attached patch fixes
problem.

Steps to reproduce problem
------------------------------------------
1. Start server and connect psql client
2. Create Tablespace tbs location 'C:\database\tbs';
3. pg_basebackup.exe -D C:\Data -Fp -x -T C:\database\tbs=C:\database\tbs1

pg_basebackup: could not remove symbolic link "C:\Data/pg_tblspc/16390": Permission denied


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachment

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Portability issues in TAP tests
Next
From: Воронин Дмитрий
Date:
Subject: Re: New functions in sslinfo module