Re: pg_restore: could not close data file: Success

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_restore: could not close data file: Success
Дата
Msg-id 20200416054009.GB81957@paquier.xyz
обсуждение исходный текст
Ответ на Re: pg_restore: could not close data file: Success  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: pg_restore: could not close data file: Success
Re: pg_restore: could not close data file: Success
Список pgsql-general
On Thu, Apr 16, 2020 at 12:08:09PM +0900, Kyotaro Horiguchi wrote:
> I'm surprised to find an old thread about the same issue.
>
> https://www.postgresql.org/message-id/20160307.174354.251049100.horiguchi.kyotaro%40lab.ntt.co.jp
>
> But I don't think it's not acceptable that use fake errno for gzclose,
> but cfclose properly passes-through the error code from gzclose, so it
> is enought that the caller should recognize the difference.

A problem with this patch is that we may forget again to add this
special error handling if more code paths use cfclose().

As of HEAD, there are three code paths where cfclose() is called but
it does not generate an error: two when ending a blob and one when
ending a data file.  Perhaps it would make sense to just move all this
error within the routine itself?  Note that it would also mean
registering file names in lclContext or equivalent as that's an
important piece of the error message.
--
Michael

Вложения

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

Предыдущее
От: Niels Jespersen
Дата:
Сообщение: SV: timestamp and timestamptz
Следующее
От: raf
Дата:
Сообщение: Re: timestamp and timestamptz