]> 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:35 +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 1e9fae456ebcf2b26c5425811eef039eedaba3c1..a6caef5096d0a880fc7eebbcf92ccaee48ae591f 100644 (file)
@@ -152,6 +152,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);