project pg_tin 1.0dev

PostgreSQL Test INfrastructure

pg_tin, Test INfrastructure, is a project to provide testing facilities for PostgreSQL applications. It is intended to automate the initialization of the database, and provide the capacity to seemlessly manage the various clusters and the configuration options thereof.

tin commands

help     Print this help menu
list     Print paths and version information to selected clusters [ls]
environ  Print standard PostgreSQL environment variable for connectivity [env]
string   Print standard PostgreSQL connectivity options [str]
path     Print path to selected clusters
create   Create a cluster using the given pg_config
drop     Drop the selected database clusters
recreate Recreate the selected clusters (configuration is lost)
stop     Signal the selected clusters to shutdown
start    Start the selected clusters
reload   Run pg_ctl reload on the selected clusters
command  Run the specified command with the current cluster's environment
set      Set the specified server parameters in each selected cluster
show     Show the specified server parameters in each selected cluster
readlogs Read the selected cluster's log file
logs     Print absolute paths to the selected cluster's log file

sample invocations

pg_tin create /usr/local/pgsql/bin/pg_config
pg_tin list
pg_tin set "search_path=public,utils" "shared_buffers=5000"
pg_tin -V 8.2 start
pg_tin -V 8.1 com psql -f sql

package postgresql.backend.tin

Test infrastructure space

module postgresql.backend.tin.control

Cup o' clusters interface
classes
class TinError(Exception):
class UnresolvablePgConfig(TinError):
class Cup(object):
The cup of clusters.
methods
def __init__(self, path, parallels =
0
):
def add(self, pg_config_path):
functions
def genport(exceptions =
()
, limit =
100
):

module postgresql.backend.tin.command

tin command line interface
functions
def isin(txt, vals):
def exit_message(c, r):
def tin(args):
def main():
data