Re: Autovacuum / full vacuum - Mailing list pgsql-performance

From Andrew Sullivan
Subject Re: Autovacuum / full vacuum
Date
Msg-id 20060117151357.GH21092@phlogiston.dyndns.org
Whole thread Raw
In response to Re: Autovacuum / full vacuum  (Michael Riess <mlriess@gmx.de>)
List pgsql-performance
On Tue, Jan 17, 2006 at 03:05:29PM +0100, Michael Riess wrote:
> There must be a way to implement a daemon which frees up space of a
> relation without blocking it too long.

Define "too long".  If I have a table that needs to respond to a
SELECT in 50ms, I don't have time for you to lock my table.  If this
were such an easy thing to do, don't you think the folks who came up
wit the ingenious lazy vacuum system would have done it?

Remember, a vacuum full must completely lock the table, because it is
physically moving bits around on the disk.  So a SELECT can't happen
at the same time, because the bits might move out from under the
SELECT while it's running.  Concurrency is hard, and race conditions
are easy, to implement.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
A certain description of men are for getting out of debt, yet are
against all taxes for raising money to pay it off.
        --Alexander Hamilton

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Autovacuum / full vacuum
Next
From: Andrew Sullivan
Date:
Subject: Re: Autovacuum / full vacuum