Skip site navigation (1) Skip section navigation (2)

pgsql: Ensure that seqscans check for interrupts at least once perpage

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Ensure that seqscans check for interrupts at least once perpage
Date: 2012-05-22 23:43:04
Message-ID: E1SWyjI-0007Pw-IT@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: 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
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/276bea211f08a3b0d6d5753b654322c8efb781d1

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

pgsql-committers by date

Next:From: Bruce MomjianDate: 2012-05-23 02:59:33
Subject: pgsql: Add 9.2 release note authorship mentions for Heikki andAlexande
Previous:From: Peter EisentrautDate: 2012-05-22 22:08:15
Subject: pgsql: Add small example about pg_archivecleanup -x option

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group