Re: autovacuum next steps - Mailing list pgsql-hackers

From Tom Lane
Subject Re: autovacuum next steps
Date
Msg-id 12902.1171669985@sss.pgh.pa.us
Whole thread Raw
In response to autovacuum next steps  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Each worker, including the initial one, starts vacuuming tables
> according to pgstat data.  They recheck the pgstat data after finishing
> each table, so that a table vacuumed by another worker is not processed
> twice (maybe problematic: a table with high update rate may be vacuumed
> more than once.  Maybe this is a feature not a bug).

How are you going to make that work without race conditions?  ISTM
practically guaranteed that all the workers will try to vacuum the same
table.

> Once autovacuum_naptime has passed, if the workers have not finished
> yet, the launcher wants to vacuum another database.

This seems a rather strange design, as it will encourage concentrations
of workers in a single database.  Wouldn't it be better to spread them
out among multiple databases by default?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Chris Browne
Date:
Subject: Re: autovacuum next steps
Next
From: Tatsuo Ishii
Date:
Subject: n-gram search function