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
module postgresql.backend.tin.command
tin command line interface
imports
import optparse
import os
import signal
import subprocess
import sys
import name.jwp.terminfo as ti
import traceback
functions
def isin(txt, vals):
def exit_message(c, r):
def tin(args):
def main():
data
_ =
gettext.gettext
select_all =
<Option at 0x1298828: -A/--all>
select_cluster =
<Option at 0x128abc0: -c/--cluster>
select_configure =
<Option at 0x128a328: --configure>
select_pg_config =
<Option at 0x1291b70: --pg-config>
select_type =
<Option at 0x1298c38: -t/--type>
select_version =
<Option at 0x128ab48: -V/--pg-version>
tincup_path =
<Option at 0x128a378: -D/--set-directory>