Re: walsender doesn't send keepalives when writes are pending
| От | Heikki Linnakangas |
|---|---|
| Тема | Re: walsender doesn't send keepalives when writes are pending |
| Дата | |
| Msg-id | 5318D123.6080707@vmware.com обсуждение исходный текст |
| Ответ на | Re: walsender doesn't send keepalives when writes are pending (Andres Freund <andres@2ndquadrant.com>) |
| Список | pgsql-hackers |
On 03/05/2014 10:57 PM, Andres Freund wrote: > On 2014-03-05 18:26:13 +0200, Heikki Linnakangas wrote: >> The logic was the same before the patch, but I added the XXX comment above. >> Why do we sleep in increments of 1/10 of wal_sender_timeout? Originally, the >> code calculated when the next wakeup should happen, by adding >> wal_sender_timeout (or replication_timeout, as it was called back then) to >> the time of the last reply. Why don't we do that? >> [ archeology ] > > It imo makes sense to wakeup after last_reply + wal_sender_timeout/2, so > a requested reply actually has time to arrive, but otherwise I agree. > > I think your patch makes sense. Additionally imo the timeout checking > should be moved outside the if (caughtup || pq_is_send_pending()), but > that's probably a separate patch. > > Any chance you could apply your patch soon? I've a patch pending that'll > surely conflict with this and it seems better to fix it first. Ok, pushed. I left the polling-style sleep in place for now. Thanks! - Heikki
В списке pgsql-hackers по дате отправления: