Skip to content

Commit 9f61924

Browse files
committed
Add a CHECK_FOR_INTERRUPTS() in _bt_buildadd(). This fixes problem
with not responding to query cancel during the last stage of btree index creation.
1 parent 0ebf1cc commit 9f61924

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/backend/access/nbtree/nbtsort.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
* Portions Copyright (c) 1994, Regents of the University of California
5757
*
5858
* IDENTIFICATION
59-
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtsort.c,v 1.99 2006/03/05 15:58:21 momjian Exp $
59+
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtsort.c,v 1.100 2006/03/10 20:18:15 tgl Exp $
6060
*
6161
*-------------------------------------------------------------------------
6262
*/
@@ -461,6 +461,12 @@ _bt_buildadd(BTWriteState *wstate, BTPageState *state, IndexTuple itup)
461461
Size pgspc;
462462
Size itupsz;
463463

464+
/*
465+
* This is a handy place to check for cancel interrupts during the
466+
* btree load phase of index creation.
467+
*/
468+
CHECK_FOR_INTERRUPTS();
469+
464470
npage = state->btps_page;
465471
nblkno = state->btps_blkno;
466472
last_off = state->btps_lastoff;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy