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

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Дата
Msg-id CA+Tgmoa=Rs+EYviXerfxFf5ZCt=t6U-X8CrG9nadVJ_Uzgvv8g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Список pgsql-hackers
On Mon, Jun 8, 2015 at 11:16 AM, Amit Kapila <amit.kapila16@gmail.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



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: CREATE POLICY and RETURNING
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Initializing initFileRelationIds list via write is unsafe