Closed
Bug 769121
Opened 14 years ago
Closed 14 years ago
Preempt wraparound autovacuum on Socorro production
Categories
(Socorro :: Database, task)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jberkus, Assigned: mpressman)
Details
Matt,
So we're getting pretty close to needing to vacuum many of socorro's biggest tables due to XID wraparound. If we leave this up to autovacuum, then it's liable to kick in in the middle of the day and make socorro unresponsive. So we need to take two steps to avoid this *within the next week*, preferably within the next few days.
(1) Increase autovacuum_freeze_max_age to 1billion (1000000000). This is about our maximum safe limit.
(2) write a script which vacuums the oldest tables during the night/weekend to preempt autovacuum. You can get the oldest tables by running:
SELECT relname, age(relfrozenxid) FROM pg_class WHERE relkind = 'r';
anything over 300,000,000 should probably be vacuumed. You'd do this by:
SET vacuum_freeze_min_age = 10000;
SET vacuum_freeze_table_age = 0;
VACUUM <tablename>.
... for each table over 300,000,000.
We should probably script (2) so that we can do it a couple times a year.
| Reporter | ||
Comment 1•14 years ago
|
||
Oh, also:
(3) we should have a nagios probe on wraparound. I'd swear we installed one when we set up PHX; can you check on it?
| Assignee | ||
Comment 2•14 years ago
|
||
I increased the autovacuum_freeze_max_age on prod during the purge downtime.
So #1 has been completed.
| Assignee | ||
Comment 3•14 years ago
|
||
I'll be running this tonight after hours ~6:00PST
| Assignee | ||
Comment 4•14 years ago
|
||
there are currently 176 tables that will be vacuumed.
| Assignee | ||
Comment 5•14 years ago
|
||
running vacuum now
| Assignee | ||
Comment 6•14 years ago
|
||
I had the vacuuming cut off at 2am for the batch jobs, I'll check the output to see how far we got and post it shortly
| Assignee | ||
Comment 7•14 years ago
|
||
so 88 of the 176 were vacuumed, half - I will kick off the rest so it will finish tonight
| Assignee | ||
Comment 8•14 years ago
|
||
kicking off the next round of vacuuming.
| Assignee | ||
Comment 9•14 years ago
|
||
vacuuming completed for all 176 rels
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•