Re: BUG #13888: pg_dump write error

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #13888: pg_dump write error
Дата
Msg-id 20160127113326.GA639380@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: BUG #13888: pg_dump write error  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #13888: pg_dump write error  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane wrote:
> Michael Paquier <michael.paquier@gmail.com> writes:
> > On Tue, Jan 26, 2016 at 1:08 AM, Alvaro Herrera
> > <alvherre@2ndquadrant.com> wrote:
> >> Yeah, I noticed this and similar lacks of error checks in pg_dump in
> >> code review, which I didn't get around to patching.  Care to submit a
> >> patch?
>
> > Indeed, with a closer look there are things like tarWrite that can
> > return 0 and trigger WRITE_ERROR_EXIT with the same thing. Couldn't we
> > simply check for errno = 0 and generate a more generic error message
> > instead? Or are you willing at replacing all those things with just
> > exit_horribly()?
>
> I do not understand these claims that there isn't an error check there.
> There surely is.  But fwrite() didn't set errno.

Yeah, that's what I was remembering actually:
http://www.postgresql.org/message-id/20150608174336.GM133018@postgresql.org

> The real question is why did he get a short write in the first place.
> We don't make any attempt to support filesystems that require retries,
> which seems to be what is going on here.  Should we?

Sounds likely.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Re[2]: [BUGS] Segfault in MemoryContextAlloc
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Re[2]: [BUGS] Segfault in MemoryContextAlloc