| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Replication server timeout patch |
| Date: | 2011-03-07 11:47:00 |
| Message-ID: | AANLkTin2U22=C+nYqy7LUNy-sHH2qVCCZ3mN5e6X-cBe@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Mar 6, 2011 at 11:10 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Sun, Mar 6, 2011 at 5:03 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)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.
I rebased the patch against current git master.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
| Attachment | Content-Type | Size |
|---|---|---|
| replication_timeout_v5.patch | application/octet-stream | 43.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thom Brown | 2011-03-07 12:05:31 | Column-level trigger doc typo fix |
| Previous Message | Fujii Masao | 2011-03-07 11:21:39 | Re: [COMMITTERS] pgsql: Efficient transaction-controlled synchronous replication. |