From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | MauMau <maumau307(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: option -T in pg_basebackup doesn't work on windows |
Date: | 2014-08-15 03:40:05 |
Message-ID: | CAA4eK1+cC9RB1S9Q4+nSOkfas1YufVFGFxUHxY_6wLBQ1ReroQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Aug 13, 2014 at 9:20 PM, MauMau <maumau307(at)gmail(dot)com> wrote:
>
> From: "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com>
>
>> 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.
>
>
> I could reproduce the problem on my Windows machine.
>
> The code change appears correct, but the patch application failed against
the latest source code. I don't know why. Could you confirm this?
>
> patching file src/bin/pg_basebackup/pg_basebackup.c
> Hunk #1 FAILED at 1119.
> 1 out of 1 hunk FAILED -- saving rejects to file
src/bin/pg_basebackup/pg_basebackup.c.rej
It failed due to one of recent commits as mentioned by
Michael. Please find the rebased patch attached with this
mail
> On the following line, I think %d must be %u, because Oid is an unsigned
integer.
>
> char *linkloc = psprintf("%s/pg_tblspc/%d", basedir, oid);
Yeah, though this is not introduced by patch, but I think
this should be fixed and I have fixed it attached patch.
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
pg_basebackup_relocate_tablespace_v2.patch | application/octet-stream | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2014-08-15 05:16:31 | Re: pg_shmem_allocations view |
Previous Message | Kyotaro HORIGUCHI | 2014-08-15 03:32:18 | Re: alter user set local_preload_libraries. |