The boss project provides functionality for managing PostgreSQL database clusters. Initialization, configuration, and execution are covered by three seperate modules in the package.
The 'init' module provides a Python interface to database cluster initialization, initdb. It provides the means to do so with many options.
The 'config' module provides a Python interface to a cluster's configuration, postgresql.conf. It provides a basic mechanism to parse setting lines in the files and a relatively intelligent mechanism for applying configuration alterations.
The 'hba' module provides a Python interface to a cluster's HBA file, pg_hba.conf. It provides basic methods for parsing, and altering of HBA lines.
The 'control' module provides a Python interface to controlling the Postgres process, via pg_ctl.
package postgresql.backend.boss
Backend management interfaces
module postgresql.backend.boss.control
Abstract Controller
Python interface to a pg_ctl command relative to a data directory
Takes the data directory path and the pg_ctl command's path,
Reload the cluster--graceful restart.
Restart the cluster
Check whether the cluster is running.
Start the cluster with the given parameters.
module postgresql.backend.boss.cluster
PostgreSQL cluster management interfaces
Cluster management class
Create a cluster at the given cluster path with the given pg_config
Stop the cluster and delete it from the filesystem
Get all the settings requested in the list of keys Returns a dictionary of those keys with the values stored in the configuration file.
Get all the settings that the given selector chooses. Returns a dictionary of those keys
Given a dictionary of settings, apply them to the cluster's postgresql.conf.
'postgresql.conf'
'pg_hba.conf'
postgresql.backend.boss.control.pg_ctl
postgresql.backend.boss.init.initdb
module postgresql.backend.boss.init
PostgreSQL catalog cluster initialization interfaces
Base initializor
initdb based initializor
postgresql.backend.boss.init.initdb
module postgresql.backend.boss.config
PostgreSQL configuration file parser and editor functions.
A configuration writer that will trample & merely write the settings
Alters a configuration file without trampling on the existing structure
module postgresql.backend.boss.hba
PostgreSQL Host Based Authentication manipulation utilities.
A sequence manipulation interface for managing PostgreSQL's HBA
Take a HBA line producing iterable to manipulate
Correct the line numbers in the laws
Insert a new entry at the given index using the specified position
A configuration writer that will trample & merely write the settings
Read and split all uncommented entries in the given iterator