Re: [HACKERS] Walsender timeouts and large transactions
От | Robert Haas |
---|---|
Тема | Re: [HACKERS] Walsender timeouts and large transactions |
Дата | |
Msg-id | CA+TgmoYCnnFXNTk6EuXTxWs9CPg5X5vhOpTYxnsPzjvCfZOKeA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Walsender timeouts and large transactions (Craig Ringer <craig@2ndquadrant.com>) |
Ответы |
Re: [HACKERS] Walsender timeouts and large transactions
Re: [HACKERS] Walsender timeouts and large transactions |
Список | pgsql-hackers |
On Mon, Dec 4, 2017 at 10:59 PM, Craig Ringer <craig@2ndquadrant.com> wrote: > To me it looks like it's time to get this committed, marking as such. This version has noticeably more code rearrangement than before, and I'm not sure that is actually buying us anything. Why not keep the changes minimal? Also, TBH, this doesn't seem to have been carefully reviewed for style: - if (!pq_is_send_pending()) - return; + /* Try taking fast path unless we get too close to walsender timeout. */ + if (now < TimestampTzPlusMilliseconds(last_reply_timestamp, + wal_sender_timeout / 2)) + { + if (!pq_is_send_pending()) + return; + } Generally we write if (a && b) { ... } not if (a) { if (b) .. } - } + }; It's hard to understand how this got through review. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: