Re: pgsql: Check interrupts during logical decoding more frequently. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Check interrupts during logical decoding more frequently.
Date
Msg-id 4094.1404137424@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Check interrupts during logical decoding more frequently.  (Andres Freund <andres@anarazel.de>)
Responses Re: pgsql: Check interrupts during logical decoding more frequently.  (Andres Freund <andres@anarazel.de>)
List pgsql-committers
Andres Freund <andres@anarazel.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


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Check interrupts during logical decoding more frequently.
Next
From: Andres Freund
Date:
Subject: Re: pgsql: Check interrupts during logical decoding more frequently.