Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, 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-08 15:59:23
Message-ID: CA+Tgmoa=Rs+EYviXerfxFf5ZCt=t6U-X8CrG9nadVJ_Uzgvv8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Jun 8, 2015 at 11:16 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> 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.
>
>> 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.

Why not? I think that if we encounter some sort of situation that we
think should never happen, throwing an error is exactly what we
*should* do. Particularly when it comes to things like removing
files, it is very dangerous for the database to proceed if the
situation is not as expected. We should only remove things if we are
quite sure that removing them is the right thing to do.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2015-06-08 17:43:36 Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Previous Message Amit Kapila 2015-06-08 15:16:14 Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-06-08 16:01:02 Re: Initializing initFileRelationIds list via write is unsafe
Previous Message Stephen Frost 2015-06-08 15:53:27 Re: CREATE POLICY and RETURNING