Re: Replication server timeout patch

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Replication server timeout patch
Дата
Msg-id AANLkTi=BuEf70OTciUnPQ0DO1j3n-Zp9+aaNN1TTvxwc@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Replication server timeout patch  (Fujii Masao <masao.fujii@gmail.com>)
Ответы Re: Replication server timeout patch  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On Sun, Mar 6, 2011 at 5:03 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> Why does internal_flush_if_writable compute bufptr differently from
>> internal_flush?  And shouldn't it be static?
>>
>> It seems to me that this ought to be refactored so that you don't
>> duplicate so much code.  Maybe static int internal_flush(bool
>> nonblocking).
>>
>> I don't think that the while (bufptr < bufend) loop needs to contain
>> the code to set and clear the nonblocking state.  You could do the
>> whole loop with nonblocking mode turned on and then reenable it just
>> once at the end.  Besides possibly being clearer, that would be more
>> efficient and leave less room for unexpected failures.
>
> All these comments seem to make sense. Will fix. Thanks!

Done. I attached the updated patch.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Вложения

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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Alpha4 release blockers (was Re: wrapping up this CommitFest)
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Sync Rep v19