Re: pgsql: Check interrupts during logical decoding more frequently.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Check interrupts during logical decoding more frequently.
Date: 2014-06-30 14:10:24
Message-ID: 4094.1404137424@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Andres Freund <andres(at)anarazel(dot)de> writes:
> Check interrupts during logical decoding more frequently.

FWIW, I think it's usually better style to put CHECK_FOR_INTERRUPTS
at the tops of loops rather than the bottoms. If you put it at the
bottom, it's easily bypassed unintentionally by a "continue" somewhere
in the middle of the loop body. (I suppose there could be cases where
that's actually what you want, but if so some comments would be
appropriate, because it's fragile coding.)

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-06-30 15:23:00 Re: pgsql: Check interrupts during logical decoding more frequently.
Previous Message Andres Freund 2014-06-30 10:06:22 pgsql: Check interrupts during logical decoding more frequently.