Commit 1cb018dd authored by Robert Haas's avatar Robert Haas

Make pgstatindex respond to cancel interrupts.

A similar problem for pgstattuple() was fixed in April of 2010 by commit
33065ef8, 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.
parent 416e82ce
...@@ -156,6 +156,8 @@ pgstatindex(PG_FUNCTION_ARGS) ...@@ -156,6 +156,8 @@ pgstatindex(PG_FUNCTION_ARGS)
Page page; Page page;
BTPageOpaque opaque; BTPageOpaque opaque;
CHECK_FOR_INTERRUPTS();
/* Read and lock buffer */ /* Read and lock buffer */
buffer = ReadBuffer(rel, blkno); buffer = ReadBuffer(rel, blkno);
LockBuffer(buffer, BUFFER_LOCK_SHARE); LockBuffer(buffer, BUFFER_LOCK_SHARE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment