Trying to take a `pg_basebackup -T OLDDIR=NEWDIR [etc]` on master
(server running the cluster) fails on Windows with error "pg_basebackup:
directory "OLDDIR" exists but is not empty".
Version: 9.6.2, installed from Standard EDB package (built with MSVC).
1. Have a cluster running on Windows (you'll need max_wal_senders at
least 2 and wal_level replica for pg_basebackup -X stream)
2. create tablespace testspc location 'somedisk:\some\location'; --
Slash direction is irrelevant
3. run `pg_basebackup -T somedisk:\some\location=somedisk:\new\location
-X stream -D somedisk:\some\other_location -h 127.0.0.1 -U postgres`
The error should read:
pg_basebackup: directory "somedisk:\some\location" exists but is not empty
This was discussed today in IRC. As a temporary solution it was
suggested to add 'canonicalize_path(buf);' before return in
** DISCLAMER: note that value of r is not adjusted, so this is not a
production ready fix in any way. **
This fixed the issue, but as a side effect, pg_tablespace_location
displays path in canonicalized format which might look weird to most
There was a suggestion to fix this in client instead, but this fix was
the simplest one to implement.
This is my first post to Hackers, so please let me know if I missed
something or can provide any additional info to help further investigate