Re: Keepalive for max_standby_delay

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Keepalive for max_standby_delay
Дата
Msg-id 1274085650.28911.201.camel@ebony
обсуждение исходный текст
Ответ на Re: Keepalive for max_standby_delay  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Keepalive for max_standby_delay  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
On Sun, 2010-05-16 at 16:53 +0100, Simon Riggs wrote:
> > 
> > Attached patch rearranges the walsender loops slightly to fix the above.
> > XLogSend() now only sends up to MAX_SEND_SIZE bytes (== XLOG_SEG_SIZE /
> > 2) in one round and returns to the main loop after that even if there's
> > unsent WAL, and the main loop no longer sleeps if there's unsent WAL.
> > That way the main loop gets to respond to signals quickly, and we also
> > get to update the shared memory status and PS display more often when
> > there's a lot of catching up to do.
> > 
> > Comments
> 
> 8MB at a time still seems like a large batch to me.
> 
> libpq is going to send it in smaller chunks anyway, so I don't see the
> importance of trying to keep the batch too large. It just introduces
> delay into the sending process. We should be sending chunks that matches
> libpq better.

More to the point the logic will fail if XLOG_BLCKSZ > PQ_BUFFER_SIZE
because it will send partial pages.

Having MAX_SEND_SIZE > PQ_BUFFER_SIZE is pointless, as libpq currently
stands.

-- Simon Riggs           www.2ndQuadrant.com



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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: recovery getting interrupted is not so unusual as it used to be
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade and extra_float_digits