admin 管理员组

文章数量: 1086019


2024年4月14日发(作者:网站分析工具)

autovacuum触发条件

English Answer:

Triggers for Autovacuum.

Autovacuum is a PostgreSQL feature that automatically

removes dead tuples from tables. Dead tuples are rows that

have been deleted or updated, but still exist in the table.

Autovacuum can be triggered by the following events:

Transaction commit: When a transaction commits,

autovacuum checks if any of the tables that were modified

by the transaction need to be vacuumed.

Idle time: If PostgreSQL has been idle for a period of

time, autovacuum will check if any of the tables in the

database need to be vacuumed.

Manual invocation: Autovacuum can also be invoked

manually using the `VACUUM` or `VACUUM FULL` commands.

Autovacuum Parameters.

The following parameters can be used to control

autovacuum behavior:

autovacuum_vacuum_cost_limit: This parameter specifies

the maximum amount of work that autovacuum will perform in

a single vacuum operation.

autovacuum_vacuum_cost_delay: This parameter specifies

the minimum amount of time that must pass before autovacuum

will vacuum a table again.

autovacuum_vacuum_threshold: This parameter specifies

the percentage of dead tuples in a table that must exist

before autovacuum will vacuum the table.

autovacuum_vacuum_scale_factor: This parameter

specifies a multiplier that is used to adjust the

autovacuum_vacuum_threshold parameter based on the size of

the table.


本文标签: 网站 触发 工具 分析 条件