pgsql: Ensure that seqscans check for interrupts at least once per page - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Ensure that seqscans check for interrupts at least once per page
Date
Msg-id E1SWyjI-0007Pt-GK@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Ensure that seqscans check for interrupts at least once per page.

If a seqscan encounters many consecutive pages containing only dead tuples,
it can remain in the loop in heapgettup for a long time, and there was no
CHECK_FOR_INTERRUPTS anywhere in that loop.  This meant there were
real-world situations where a query would be effectively uncancelable for
long stretches.  Add a check placed to occur once per page, which should be
enough to provide reasonable response time without adding any measurable
overhead.

Report and patch by Merlin Moncure (though I tweaked it a bit).
Back-patch to all supported branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ed962fd712bbc0836437c8f789d9152aca5711b5

Modified Files
--------------
src/backend/access/heap/heapam.c |    7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Ensure that seqscans check for interrupts at least once per page
Next
From: Bruce Momjian
Date:
Subject: pgsql: Add 9.2 release note authorship mentions for Heikki and Alexande