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

Appearance settings

Commit 21c27af

Browse filesBrowse files
committed
Remove the vacuum_delay_point call in count_nondeletable_pages, because we hold
an exclusive lock on the table at this point, which we want to release as soon as possible. This is called in the phase of lazy vacuum where we truncate the empty pages at the end of the table. An alternative solution would be to lower the vacuum delay settings before starting the truncating phase, but this doesn't work very well in autovacuum due to the autobalancing code (which can cause other processes to change our cost delay settings). This case could be considered in the balancing code, but it is simpler this way.
1 parent d982daa commit 21c27af
Copy full SHA for 21c27af

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed

‎src/backend/commands/vacuumlazy.c

Copy file name to clipboardExpand all lines: src/backend/commands/vacuumlazy.c
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*
3737
*
3838
* IDENTIFICATION
39-
* $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.91 2007/09/05 18:10:47 tgl Exp $
39+
* $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.92 2007/09/10 17:58:45 alvherre Exp $
4040
*
4141
*-------------------------------------------------------------------------
4242
*/
@@ -868,7 +868,11 @@ count_nondeletable_pages(Relation onerel, LVRelStats *vacrelstats)
868868
bool tupgone,
869869
hastup;
870870

871-
vacuum_delay_point();
871+
/*
872+
* We don't insert a vacuum delay point here, because we have an
873+
* exclusive lock on the table which we want to hold for as short
874+
* a time as possible.
875+
*/
872876

873877
blkno--;
874878

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.