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

Commit48d4a8c

Browse files
author
Amit Kapila
committed
Allocate access strategy in parallel VACUUM workers.
Currently, parallel vacuum workers don't use any buffer access strategy.We can fix it either by propagating the access strategy from a leader orallow each worker to use BAS_VACUUM access strategy type. We don't seemuch use in propagating this information from leader as both leader andworkers are supposed to use the same strategy. We might want to use adifferent access strategy for leader and workers but that would be aseparate optimization not suitable for back-branches. This has been fixedin HEAD as commitf6b8f19.Author: Amit KapilaReviewed-by: Sawada Masahiko, Bharath RupireddyDiscussion:https://postgr.es/m/CAA4eK1KbmJgRV2W3BbzRnKUSrukN7SbqBBriC4RDB5KBhopkGQ@mail.gmail.com
1 parentbe79deb commit48d4a8c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/backend/access/heap/vacuumlazy.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3510,6 +3510,9 @@ parallel_vacuum_main(dsm_segment *seg, shm_toc *toc)
35103510
vac_open_indexes(onerel,RowExclusiveLock,&nindexes,&indrels);
35113511
Assert(nindexes>0);
35123512

3513+
/* Each parallel VACUUM worker gets its own access strategy */
3514+
vac_strategy=GetAccessStrategy(BAS_VACUUM);
3515+
35133516
/* Set dead tuple space */
35143517
dead_tuples= (LVDeadTuples*)shm_toc_lookup(toc,
35153518
PARALLEL_VACUUM_KEY_DEAD_TUPLES,
@@ -3564,6 +3567,7 @@ parallel_vacuum_main(dsm_segment *seg, shm_toc *toc)
35643567

35653568
vac_close_indexes(nindexes,indrels,RowExclusiveLock);
35663569
table_close(onerel,ShareUpdateExclusiveLock);
3570+
FreeAccessStrategy(vac_strategy);
35673571
pfree(stats);
35683572
}
35693573

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp