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

Commit21c27af

Browse 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 soonas possible. This is called in the phase of lazy vacuum where we truncate theempty pages at the end of the table.An alternative solution would be to lower the vacuum delay settings beforestarting the truncating phase, but this doesn't work very well in autovacuumdue to the autobalancing code (which can cause other processes to change ourcost delay settings). This case could be considered in the balancing code, butit is simpler this way.
1 parentd982daa commit21c27af

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎src/backend/commands/vacuumlazy.c

Lines 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
booltupgone,
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)

[8]ページ先頭

©2009-2025 Movatter.jp