Re: Re: ZeroFill(.../pg_xlog/xlogtemp.20148) failed: No such file or directory

Поиск
Список
Период
Сортировка
От Chris Jones
Тема Re: Re: ZeroFill(.../pg_xlog/xlogtemp.20148) failed: No such file or directory
Дата
Msg-id 20010523114451.F437@mt.sri.com
обсуждение исходный текст
Ответ на Re: Re: ZeroFill(.../pg_xlog/xlogtemp.20148) failed: No such file or directory  (Chris Jones <chris@mt.sri.com>)
Ответы Re: Re: ZeroFill(.../pg_xlog/xlogtemp.20148) failed: No such file or directory  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Wed, May 23, 2001 at 11:39:15AM -0600, Chris Jones wrote:

> No, it could be any number of other things.  The first that comes to
> mind is EINTR.  How about something closer to:

Hmm.  Actually, write(2) shouldn't return EINTR; it should return a
short read count.  But other errno values include EDQUOT and EFBIG.
So the code I suggested is not very good, either.  Better to just do:

> totalwritten = 0;
> while(totalwritten < expectedbytecount) {
>     lastwritten = write(...);
>     if(lastwritten == -1) {
>         /* errno is guaranteed to be set */
>         unlink(tmp);
>         elog(...);
>         break;
>     } else {
>         /* we got a partial write count.  No problem; try again. */
>         totalwritten += lastwritten;
>     }
> }

Chris

--
chris@mt.sri.com -----------------------------------------------------
Chris Jones                                    SRI International, Inc.
                                                           www.sri.com

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: ZeroFill(.../pg_xlog/xlogtemp.20148) failed: No such file or directory
Следующее
От: "Mihai Gheorghiu"
Дата:
Сообщение: Connection from Win machine