From: Robert Haas Date: Thu, 6 Oct 2011 16:08:59 +0000 (-0400) Subject: Make pgstatindex respond to cancel interrupts. X-Git-Tag: REL9_1_2~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5308abfd89b080399f4050f720ffb8824c682e59;p=postgresql Make pgstatindex respond to cancel interrupts. A similar problem for pgstattuple() was fixed in April of 2010 by commit 33065ef8bc52253ae855bc959576e52d8a28ba06, but pgstatindex() seems to have been overlooked. Back-patch all the way, as with that commit, though not to 7.4 through 8.1, since those are now EOL. --- diff --git a/contrib/pgstattuple/pgstatindex.c b/contrib/pgstattuple/pgstatindex.c index 0fc3ecff6a..ceabd862a8 100644 --- a/contrib/pgstattuple/pgstatindex.c +++ b/contrib/pgstattuple/pgstatindex.c @@ -155,6 +155,8 @@ pgstatindex(PG_FUNCTION_ARGS) Page page; BTPageOpaque opaque; + CHECK_FOR_INTERRUPTS(); + /* Read and lock buffer */ buffer = ReadBuffer(rel, blkno); LockBuffer(buffer, BUFFER_LOCK_SHARE);