Skip to content

benburry/megamaid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

megamaid

Hacky, nonrobust, little-bit-noddy, potentially destructive tool for running a configurable PostgreSQL vacuum schedule against named tables in your database. Use in production at your own risk. We do.

Usage

do_vacuum.py is the place to look for an example implementation. You need to call the megamaid.vacuum function with the target database name and a schedule for the tables you want vacuumed on each day of the week. The vacuum schedule format is described in megamaid.py

Once you have a schedule you're happy with, slap it in cron, redirecting stdout somewhere useful (perhaps somewhere that pgfouine can get to)

Important

Note that megamaid expects the psql and vaccumdb binaries to be on your path, and requiring no username/password to access your database. Also, the megamaid.REMAINING_TABLES function currently only works for tables in the public schema

Disclaimers

This works for us, but it might well not work for you. I accept no responsibility if this does terrible, terrible things to your database.

All credit to @barn for naming

About

SUCK! SUCK! SUCK!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages