Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TableBloatQuery ¶
TableBloatQuery returns the query to run to check for table bloat. Taken from: https://raw.githubusercontent.com/pgexperts/pgx_scripts/master/bloat/table_bloat_check.sql
Types ¶
type DBA ¶
type DBA struct {
// contains filtered or unexported fields
}
DBA is an automatic database administrator.
type Options ¶
type Options struct { PreAnalyze bool AnalyzeTimeout time.Duration PostAnalyze bool BloatQueryTimeout time.Duration PreVacuum bool VacuumTimout time.Duration FullVacuumBloatPercent int // Only consider tables with bloat larger than this percent to need a full vacuum FullVacuumMaxTableSizeMb int // Do not vacuum tables larger than this size due to the amount of time it would take FullVacuumTimeout time.Duration // Cancel full vacuum's that take longer than this many seconds Timeout time.Duration // Default timeout for everything else Verbose bool }
Options controll how the DBA determines what to do
func NewDefaultOptions ¶
func NewDefaultOptions() Options
NewDefaultOptions returns new Options initilized with our reasonable defaults
Click to show internal directories.
Click to hide internal directories.