Struct postgresql_commands::vacuumdb::VacuumDbBuilder
source · pub struct VacuumDbBuilder { /* private fields */ }
Expand description
vacuumdb cleans and analyzes a PostgreSQL database.
Implementations§
source§impl VacuumDbBuilder
impl VacuumDbBuilder
vacuumdb cleans and analyzes a PostgreSQL database.
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new VacuumDbBuilder
sourcepub fn from(settings: &dyn Settings) -> Self
pub fn from(settings: &dyn Settings) -> Self
Create a new VacuumDbBuilder from Settings
sourcepub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
pub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
Location of the program binary
sourcepub fn buffer_usage_limit<S: AsRef<OsStr>>(self, buffer_usage_limit: S) -> Self
pub fn buffer_usage_limit<S: AsRef<OsStr>>(self, buffer_usage_limit: S) -> Self
size of ring buffer used for vacuum
sourcepub fn disable_page_skipping(self) -> Self
pub fn disable_page_skipping(self) -> Self
disable all page-skipping behavior
sourcepub fn force_index_cleanup(self) -> Self
pub fn force_index_cleanup(self) -> Self
always remove index entries that point to dead tuples
sourcepub fn min_mxid_age<S: AsRef<OsStr>>(self, min_mxid_age: S) -> Self
pub fn min_mxid_age<S: AsRef<OsStr>>(self, min_mxid_age: S) -> Self
minimum multixact ID age of tables to vacuum
sourcepub fn min_xid_age<S: AsRef<OsStr>>(self, min_xid_age: S) -> Self
pub fn min_xid_age<S: AsRef<OsStr>>(self, min_xid_age: S) -> Self
minimum transaction ID age of tables to vacuum
sourcepub fn no_index_cleanup(self) -> Self
pub fn no_index_cleanup(self) -> Self
don’t remove index entries that point to dead tuples
sourcepub fn no_process_main(self) -> Self
pub fn no_process_main(self) -> Self
skip the main relation
sourcepub fn no_process_toast(self) -> Self
pub fn no_process_toast(self) -> Self
skip the TOAST table associated with the table to vacuum
sourcepub fn no_truncate(self) -> Self
pub fn no_truncate(self) -> Self
don’t truncate empty pages at the end of the table
sourcepub fn schema<S: AsRef<OsStr>>(self, schema: S) -> Self
pub fn schema<S: AsRef<OsStr>>(self, schema: S) -> Self
vacuum tables in the specified schema(s) only
sourcepub fn exclude_schema<S: AsRef<OsStr>>(self, exclude_schema: S) -> Self
pub fn exclude_schema<S: AsRef<OsStr>>(self, exclude_schema: S) -> Self
do not vacuum tables in the specified schema(s)
sourcepub fn parallel(self, parallel: u32) -> Self
pub fn parallel(self, parallel: u32) -> Self
use this many background workers for vacuum, if available
sourcepub fn skip_locked(self) -> Self
pub fn skip_locked(self) -> Self
skip relations that cannot be immediately locked
sourcepub fn analyze_only(self) -> Self
pub fn analyze_only(self) -> Self
only update optimizer statistics; no vacuum
sourcepub fn analyze_in_stages(self) -> Self
pub fn analyze_in_stages(self) -> Self
only update optimizer statistics, in multiple stages for faster results; no vacuum
sourcepub fn no_password(self) -> Self
pub fn no_password(self) -> Self
never prompt for password
sourcepub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
pub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
user password
sourcepub fn maintenance_db<S: AsRef<OsStr>>(self, maintenance_db: S) -> Self
pub fn maintenance_db<S: AsRef<OsStr>>(self, maintenance_db: S) -> Self
alternate maintenance database
Trait Implementations§
source§impl Clone for VacuumDbBuilder
impl Clone for VacuumDbBuilder
source§fn clone(&self) -> VacuumDbBuilder
fn clone(&self) -> VacuumDbBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl CommandBuilder for VacuumDbBuilder
impl CommandBuilder for VacuumDbBuilder
source§fn get_program(&self) -> &'static OsStr
fn get_program(&self) -> &'static OsStr
Get the program name
source§fn get_program_dir(&self) -> &Option<PathBuf>
fn get_program_dir(&self) -> &Option<PathBuf>
Location of the program binary