Re: walsender doesn't send keepalives when writes are pending

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: walsender doesn't send keepalives when writes are pending
Дата
Msg-id 20140225162302.GS6718@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: walsender doesn't send keepalives when writes are pending  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: walsender doesn't send keepalives when writes are pending  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2014-02-25 11:15:46 -0500, Robert Haas wrote:
> On Tue, Feb 25, 2014 at 10:54 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> > I am not sure I can follow. Why doesn't it make sense to send out the
> > keepalive (with replyRequested = true) when we're busy sending stuff
> > (which will be the case most of the time on a busy server)?
> 
> It may very well make sense, but your patch won't generally have that
> effect, because with the patch you proposed, the keep-alive can only
> be sent when the server is busy if the write queue is also full.

Well, it either needs to be caughtup *or*/and have a busy write queue,
right? Usually that state will be reached very quickly because before
that we're writing data to the network as fast as it can be read from
disk.
Also, there's no timeout checks outside that if (caughtup ||
send_pending()) block, so there's not much of a window to hit problems when
that loop isn't entered.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: walsender doesn't send keepalives when writes are pending
Следующее
От: Robert Haas
Дата:
Сообщение: Re: walsender doesn't send keepalives when writes are pending