Re: Some thoughts about i/o priorities and throttling vacuum

From: "Stephen" <jleelim(at)xxxxxx(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Some thoughts about i/o priorities and throttling vacuum
Date: 2003-10-17 04:21:20
Message-ID: 57Kjb.18$PO4.4@nntp-post.primus.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is it possible to have an optional delay in plain VACUUM for each invocation
rather than database wide? Something along the line of an optional THROTTLE
or DELAY parameter for the VACUUM command. The THROTTLE is ignored when FULL
or FREEZE is selected.

VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [THROTTLE] ANALYZE [ table [ (column
[, ...] ) ] ]

This way autovacuum can still throttle VACUUM as needed in future (either in
contrib or backend) and administrators can decide to apply different delays
for different tables depending on the usage.

Regards, Stephen

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote in message
news:16916(dot)1066349859(at)sss(dot)pgh(dot)pa(dot)us(dot)(dot)(dot)
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Of course, this makes VACUUM run longer, and if you are waiting for it
> > to finish, it would be worse, like if you are running it at night or
> > something.
> > I think the delay has to take into account the number of active
> > transactions or something.
>
> I was just thinking of a GUC parameter: wait N milliseconds between
> pages, where N defaults to zero probably. A user who wants to run his
> vacuum as a background process could set N larger than zero. I don't
> believe we are anywhere near being able to automatically adjust the
> delay based on load, and even if we could, this would ignore the point
> you make above --- the user's intent has to matter as much as anything
> else.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2003-10-17 05:03:37 Re: Question about debugger
Previous Message Tom Lane 2003-10-17 01:38:07 Re: Some more information_schema issues