Do CHECK_FOR_INTERRUPTS inside, not before, scanGetItem.

The CHECK_FOR_INTERRUPTS call in gingetbitmap turns out to be
inadequate to prevent a long uninterruptible loop, because
we now know a case where looping occurs within scanGetItem.
While the next patch will fix the bug that caused that, it
seems foolish to assume that no similar patterns are possible.
Let's do the CFI within scanGetItem's retry loop, instead.
This demonstrably allows canceling out of the loop exhibited
in bug #19031.

Bug: #19031
Reported-by: Tim Wood <washwithc...@gmail.com>
Author: Tom Lane <t...@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19031-0638148643d25...@postgresql.org
Backpatch-through: 13

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a9c1b9c1c6063cf99b71bd755f48546ba1709f0e

Modified Files
--------------
src/backend/access/gin/ginget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Reply via email to