Re: "caught_up" status in walsender

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: "caught_up" status in walsender
Дата
Msg-id 4C06ADA5.1040409@enterprisedb.com
обсуждение исходный текст
Ответ на "caught_up" status in walsender  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: "caught_up" status in walsender  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 02/06/10 21:44, Tom Lane wrote:
> In conjunction with that, I think there's a logic bug in XLogSend;
> it ought to be changed like so:
>
>     /* if we went beyond SendRqstPtr, back off */
>     if (XLByteLT(SendRqstPtr, endptr))
> +    {
>         endptr = SendRqstPtr;
> +        *caughtup = true;
> +    }
>
> In the current coding, the effect of not setting *caughtup here is just
> that we uselessly call XLogSend an extra time for each transmission
> (because the main loop won't ever delay immediately after a
> transmission).  But without this, we'd never send caughtup = true
> to the slave.

That's intentional. It could take some time for the WAL to be sent, if 
the network is busy, so by the time XLogSend returns you might well not 
be caught up anymore.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Keepalive for max_standby_delay
Следующее
От: Tom Lane
Дата:
Сообщение: Re: "caught_up" status in walsender