Re: [HACKERS] Walsender timeouts and large transactions
Craig Ringer <craig@2ndquadrant.com>
From: Craig Ringer <craig@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Petr Jelinek <petr.jelinek@2ndquadrant.com>, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, Yura Sokolov <funny.falcon@postgrespro.ru>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
Petr Jelinek <pjmodos@pjmodos.net>
Date: 2017-12-06T00:29:56Z
Lists: pgsql-hackers
On 6 December 2017 at 04:07, Robert Haas <robertmhaas@gmail.com> wrote:
> 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.
>
Entirely my fault - I tend to forget to look at code style when I'm focused
on functionality. My apologies, and thanks for the reminder.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Fix walsender timeouts when decoding a large transaction
- f5c7e0cddf6a 9.4.16 landed
- 87056267eb85 9.5.11 landed
- c28e0b1e0ab9 9.6.7 landed
- 14c15b1f45c8 10.2 landed
- 0fedb4ea6946 11.0 landed