Re: autovacuum next steps

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: autovacuum next steps
Date: 2007-02-16 23:53:05
Message-ID: 12902.1171669985@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Kirkwood 2007-02-17 00:13:51 Re: Avg performance for int8/numeric
Previous Message FAST PostgreSQL 2007-02-16 23:34:59 WIP patch - INSERT-able log statements