[HACKERS] pg_basebackup fails on Windows when using tablespace mapping

Поиск
Список
Период
Сортировка
От nb
Тема [HACKERS] pg_basebackup fails on Windows when using tablespace mapping
Дата
Msg-id 4e641357-69bb-d09b-9174-cb08facb94b8@gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] pg_basebackup fails on Windows when using tablespace mapping  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers

Summary:

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).


Repro steps:

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 /src/port/dirmod.c:336


** 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 Windows users.

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 this issue.


Kind regards,

Nick.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Another reason why the recovery tests take a long time
Следующее
От: Jeevan Ladhe
Дата:
Сообщение: Re: [HACKERS] fix empty array expression in get_qual_for_list()