Re: BUG #13888: pg_dump write error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #13888: pg_dump write error
Дата
Msg-id 21643.1454452342@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #13888: pg_dump write error  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
Andres Freund <andres@anarazel.de> writes:
> On February 2, 2016 10:12:54 PM GMT+01:00, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ie, assume a short write implies out-of-disk-space.  I believe that
>> is what we do in most (hopefully all) cases in the backend; see for
>> example UpdateControlFile() in xlog.c.

> There's an exception: when writing WAL we intentionally retry on short writes. IIRC Heikki added that after we found
acase where large writes returned short, but non zero, and trying again to finish the rest works. I'm nor sure of there
aren'tother cases where that should be done, die to large writes. 

I could support making pg_dump do that if there's a way to do it when
writing through zlib (which is probably the normal case these days).
I'm not at all sure that gzwrite() is retryable after a partial write;
that would likely have consequences for the internal state of the
compressor.

In any case, if you get nbytes == 0 and errno == 0, substituting ENOSPC
seems like the right thing.

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #13908: Query returns too few rows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13908: Query returns too few rows