-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we revert the autovacuum postgresql.conf overrides back to the defaults? #969
Comments
@kbrock @bdunne do you have any thoughts? I think Jason and I are both leaning towards using the deleting the |
Configuring Vacuum Darn, thought I already created an issue. Can't find it. Table percentage change basedThe default values are optimized for reasonably sized tables (guessing 100,000 records).
threshold only comes into play for very small tables. And in those cases, we don't need to vacuum / rerun statistics. example: If a table with 10 records adds 4 records, the table changed by 40% which is bigger than the 20% factor, and it would run vacuum. Table rows change basedAs you guessed, once you get to a million records, that 20% sure is big.
That will vacuum every 10k records added. We need to research what we want. Middle groundThe configuration referenced is an attempt to work with big and small tables. Otherwise our schema would need to configure each table. And that is not I kinda like what they set
They de-emphaized the scale factor (table changes by 5%) but added the threshold up. Which looks good since if it is that small, then don't bother. But regardless of what they are setting, it is not doing what we need... Our issueBut our table has a ton of changes, and vacuum is still not running. So that means those changes won't do everything we need. Vacuum defers to read/write operations. And they are always happening. So we probably need to tell the system that we want to vacuum, even if it may slow down some processes. The referenced article shows how to be overly aggressive. This is meant as an extreme example and now what we want to do. But it does show the factors that come into play.
good reference: https://dba.stackexchange.com/questions/21068/aggressive-autovacuum-on-postgresql but I realize that article is good because I've already read up on the topic. TL;DRwe can keep or drop those changes. They are not addressing our issue. |
|
While reviewing #968 to solve ManageIQ/container-postgresql#40, @Fryguy suggested we should consider removing the autovacuum overrides found here.
These were set a very long time ago and we have no background on whether it's still needed. We have seen some table not being autoanalyzed so perhaps our threshold settings are less than ideal.
The text was updated successfully, but these errors were encountered: