]> granicus.if.org Git - postgresql/commitdiff
Make pgstatindex respond to cancel interrupts.
authorRobert Haas <rhaas@postgresql.org>
Thu, 6 Oct 2011 16:08:59 +0000 (12:08 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 6 Oct 2011 16:10:19 +0000 (12:10 -0400)
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.

contrib/pgstattuple/pgstatindex.c

index 9a7af67778cb101ef1e7d6e4d819ef875deaeaa8..c3d080ca5519ce6bd9d19ff6c6a17b4a0b4eff45 100644 (file)
@@ -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);