Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2d7f694

Browse files
committed
Move btbulkdelete's vacuum_delay_point() call to a place in the loop where
we are not holding a buffer content lock; where it was, InterruptHoldoffCountis positive and so we'd not respond to cancel signals as intended. Alsoadd missing vacuum_delay_point() call in btvacuumcleanup. This should fixcomplaint from Evgeny Gridasov about failure to respond to SIGINT/SIGTERMin a timely fashion (bug #2257).
1 parent49758f4 commit2d7f694

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎src/backend/access/nbtree/nbtree.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.140 2006/02/12 00:18:17 tgl Exp $
15+
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtree.c,v 1.141 2006/02/14 17:20:01 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -580,8 +580,6 @@ btbulkdelete(PG_FUNCTION_ARGS)
580580
maxoff;
581581
BlockNumbernextpage;
582582

583-
vacuum_delay_point();
584-
585583
ndeletable=0;
586584
page=BufferGetPage(buf);
587585
opaque= (BTPageOpaque)PageGetSpecialPointer(page);
@@ -638,6 +636,10 @@ btbulkdelete(PG_FUNCTION_ARGS)
638636
}
639637
else
640638
_bt_relbuf(rel,buf);
639+
640+
/* call vacuum_delay_point while not holding any buffer lock */
641+
vacuum_delay_point();
642+
641643
/* And advance to next page, if any */
642644
if (nextpage==P_NONE)
643645
break;
@@ -732,6 +734,8 @@ btvacuumcleanup(PG_FUNCTION_ARGS)
732734
Pagepage;
733735
BTPageOpaqueopaque;
734736

737+
vacuum_delay_point();
738+
735739
/*
736740
* We can't use _bt_getbuf() here because it always applies
737741
* _bt_checkpage(), which will barf on an all-zero page. We want to

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp