Re: why vacuum - Mailing list pgsql-sql

From Tom Lane
Subject Re: why vacuum
Date
Msg-id 2123.1130303680@sss.pgh.pa.us
Whole thread Raw
In response to why vacuum  (Kenneth Gonsalves <lawgon@thenilgiris.com>)
Responses Re: why vacuum
List pgsql-sql
Kenneth Gonsalves <lawgon@thenilgiris.com> writes:
> i was in a minor flame war with a mysql guy - his major grouse was that 
> 'I wouldnt commit mission critical data to a database that needs to be 
> vacuumed once a week'.

This guy is not worth arguing with.

> So why does pg need vacuum?

Every database needs maintenance operations.  PG is designed in a way
that exposes the maintenance operations to the control of the DBA a bit
more than most other DBMSes do: specifically, you get to decide when
some of the overhead work happens.  We think this is a feature, because
you can schedule the overhead for low-activity periods (nights,
weekends, whatever).  In other DBMSes the equivalent work happens as
part of foreground queries, no matter how time-critical they might be.

Now, there's no doubt that for a database run by a non-expert person
who can't even spell DBA, exposing this sort of knob isn't very helpful.
So there's work afoot to provide automatic maintenance tools (ie,
autovacuum).  Over time I think autovacuum will get smart enough that
even experts will usually use it.  But that point will only be reached
when autovacuum has some idea about doing more work during low-load
periods.

Unless MySQL invents some concept equivalent to VACUUM, they won't have
any prayer at all of being able to shift maintenance overhead to
low-load times.
        regards, tom lane


pgsql-sql by date:

Previous
From: Kenneth Gonsalves
Date:
Subject: why vacuum
Next
From: Michael Fuhr
Date:
Subject: Re: why vacuum