From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, hlinnaka <hlinnaka(at)iki(dot)fi>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file |
Date: | 2015-06-09 15:07:20 |
Message-ID: | 55770128.6060905@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On 06/08/2015 11:19 PM, Amit Kapila wrote:
> On Tue, Jun 9, 2015 at 12:27 AM, Andrew Dunstan <andrew(at)dunslane(dot)net
> <mailto:andrew(at)dunslane(dot)net>> wrote:
>
>
> On 06/08/2015 11:16 AM, Amit Kapila wrote:
>
>
> I have to retry that operation, but for me unlink hasn't deleted
> the file on Windows, may be I am not doing properly, but in
> anycase why we want to throw error for such a case, why
> can't we just ignore and create a symlink with the same name.
>
>
> 1. You realize that in Windows postgres, unlink is actually
> pgunlink(), right? See port.h. If your experiments weren't using
> that then they weren't testing the same thing.
>
>
> Yes, I know that and was using the same version, but the
> small problem in my test was that the file name that is used
> for unlink was not same as that of actual file in directory, sorry
> for the noise.
>
> 2. If the unlink fails and the file is still there (i.e. pretty
> much everything except the ENOENT case) then creation of the
> symlink is bound to fail anyway.
>
> I realize our existing code just more or less assumes that that
> it's a symlink. I think we've probably been a bit careless
> there.
>
>
> I agree with you that deleting unrelated file with the same
> name as
> symlink is not the right thing to do, but not sure throwing
> error for
> such a case is better either.
>
>
>
>
> What else would you suggest?
>
>
> I think Robert and Alvaro also seems to be inclined towards throwing
> error for such a case, so let us do that way, but one small point is that
> don't you think that similar code in destroy_tablespace_directories()
> under
> label "remove_symlink:" should use similar logic?
Yes, probably.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-06-09 17:07:22 | pgsql: First-draft release notes for 9.4.4, 9.3.9, 9.2.13, 9.1.18, 9.0. |
Previous Message | Amit Kapila | 2015-06-09 06:29:33 | Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2015-06-09 15:16:06 | Re: The Future of Aggregation |
Previous Message | Alvaro Herrera | 2015-06-09 15:00:10 | Re: The Future of Aggregation |