Re: Postgresql backend to perform vacuum automatically - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Postgresql backend to perform vacuum automatically
Date
Msg-id GNELIHDDFBOCMGBFGEFOKEKACBAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: Postgresql backend to perform vacuum automatically  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Postgresql backend to perform vacuum automatically  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
> > Yes, makes sense to me, especially now that we have a nolocking vacuum.
> > Tom, do you have any ideas on this?
>
> There's a TODO item about this already.
>
> * Provide automatic scheduling of background vacuum (Tom)

I think an good system would have some parameters something like this in
postgresql.conf:

vacuum_update_threshold
= num of operations that cause frags on a table before a vacuum is run, 0 =
no requirement, if followed by a percent (%) sign, indicates percentage of
rows changed, rather than an absolute number

vacuum_idle_threshold
= system load below which the system must be before a vacuum can be
performed.  0 = no requirement

vacuum_time_threshold
= seconds since last vacuum before which another vacuum cannot occur. 0 = no
requirement.

If all 3 are 0, then no auto-vacuuming is performed at all.  There's
probably trouble if only the idle threshold is set to zero.

And the same for the 'analyze' command?

If they want it on a per-table basis, then they can just do it themselves
with a cronjob!

Chris




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgresql backend to perform vacuum automatically
Next
From: Bruce Momjian
Date:
Subject: Re: Postgresql backend to perform vacuum automatically