mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Avoid having autovacuum workers wait for relation locks.
Waiting for relation locks can lead to starvation - it pins down an autovacuum worker for as long as the lock is held. But if we're doing an anti-wraparound vacuum, then we still wait; maintenance can no longer be put off. To assist with troubleshooting, if log_autovacuum_min_duration >= 0, we log whenever an autovacuum or autoanalyze is skipped for this reason. Per a gripe by Josh Berkus, and ensuing discussion.
This commit is contained in:
@ -4080,7 +4080,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
|
||||
all autovacuum actions. Minus-one (the default) disables logging
|
||||
autovacuum actions. For example, if you set this to
|
||||
<literal>250ms</literal> then all automatic vacuums and analyzes that run
|
||||
250ms or longer will be logged. Enabling this parameter can be helpful
|
||||
250ms or longer will be logged. In addition, when this parameter is
|
||||
set to any value other than <literal>-1</literal>, a message will be
|
||||
logged if an autovacuum action is skipped due to the existence of a
|
||||
conflicting lock. Enabling this parameter can be helpful
|
||||
in tracking autovacuum activity. This setting can only be set in
|
||||
the <filename>postgresql.conf</> file or on the server command line.
|
||||
</para>
|
||||
|
Reference in New Issue
Block a user