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

Are we accepting cancel interrupts too often?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Are we accepting cancel interrupts too often?
Date: 2001-12-30 18:46:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Presently, the RESUME_INTERRUPTS() and END_CRIT_SECTION() macros implicitly
do a CHECK_FOR_INTERRUPTS(); that is, if a cancel request arrived during
the interrupt-free section it will be serviced immediately upon exit
from the section.

It strikes me that this is a really bad idea.  There are lots of places
where we release one lock then acquire another, and are not expecting to
lose control in between.  The original concept of the query-cancel
facility was that we'd accept cancels only at *explicit*
CHECK_FOR_INTERRUPTS points.  What we actually have at the moment is
that cancels could be accepted in a very wide variety of places, and
I don't believe we've considered the consequences at each such place.

I am inclined to remove the ProcessInterrupts calls from

			regards, tom lane


pgsql-hackers by date

Next:From: Olivier PRENANTDate: 2001-12-30 19:12:00
Subject: Little question on owners
Previous:From: Tom LaneDate: 2001-12-30 18:04:29
Subject: Re: LWLock contention: I think I understand the problem

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