Re: BUG #13888: pg_dump write error

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: BUG #13888: pg_dump write error
Дата
Msg-id 56789B34-35AF-4A95-B922-332C685265AB@anarazel.de
обсуждение исходный текст
Ответ на Re: BUG #13888: pg_dump write error  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #13888: pg_dump write error
Список pgsql-bugs
On February 2, 2016 10:12:54 PM GMT+01:00, Tom Lane <tgl@sss.pgh.pa.us> wrote:

>Actually, now that I think about it while not in an airport, what I
>think we really need is logic along the lines of
>
>      errno = 0;
>      nbytes = fwrite(...);
>      if (nbytes != expected && errno == 0)
>           errno = ENOSPC;
>
>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 a
casewhere 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. 

Andres

---
Please excuse brevity and formatting - I am writing this on my mobile phone.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13888: pg_dump write error
Следующее
От: dmitry-ryabov@mail.ru
Дата:
Сообщение: BUG #13906: improper hstore_to_json_loose functioning