Re: Re: ZeroFill(.../pg_xlog/xlogtemp.20148) failed: No such file or directory
В списке pgsql-general по дате отправления:
| От | Ian Lance Taylor |
|---|---|
| Тема | Re: Re: ZeroFill(.../pg_xlog/xlogtemp.20148) failed: No such file or directory |
| Дата | |
| Msg-id | siitirke2r.fsf@daffy.airs.com обсуждение исходный текст |
| Ответ на | Re: Re: ZeroFill(.../pg_xlog/xlogtemp.20148) failed: No such file or directory (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Chris Jones <chris@mt.sri.com> writes:
> > If write didn't return -1, it shouldn't have set errno. A short write
> > count isn't an error condition.
>
> On disk files it certainly is; there's no non-error reason to do that,
> and AFAICS no reason for the application to try again.
Probably true, but on Unix you certainly can't assume that write will
set errno if it does not return -1. On Linux systems, for example,
this does not happen. As Chris says, Posix only promises to set errno
if there is an error indication. The only error indication for write
is a return of -1.
A portable way to check whether errno was set would be to do something
like
errno = 0;
if (write(...) != ...)
{
if (errno == 0)
error("unexpected short write--disk full?")
else
error("write failed: %s", strerror(errno));
}
Ian
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера