.\" Copyright 2004-2009 by PgPool Global Development Group
.\" This man page is subject to the same license as the rest of pgpool.
.\"
.TH PGPOOL 8 "12 Oct 2009"
.\" Please adjust this date whenever revising the manpage.
.hy 0
.ad l
.nf
.SH NAME
pgpool \- PostgreSQL connection pool daemon
.SH SYNOPSIS
\fBpgpool\fR [ \fB\-c\fR] [ \fB\-f config_file\fR ] [ \fB\-F pcp_config_file\fR ] [ \fB\-a hba_file\fR ] [ \fB\-n\fR ] [ \fB\-d\fR ]
.LP
\fBpgpool\fR [ \fB\-f config_file\fR ] [ \fB\-F pcp_config_file\fR ] [ \fB\-a hba_file\fR ] [ \fB\-m\fR \fI{s[mart]|f[ast]|i[mmediate]}\fR ] \fBstop\fR
.LP
\fBpgpool\fR [ \fB\-f config_file\fR ] [ \fB\-F pcp_config_file\fR ] [ \fB\-a hba_file\fR ] \fBreload\fR
.LP
.SH DESCRIPTION
\fBpgpool\fR is a connection pool server for PostgreSQL.
\fBpgpool\fR runs between PostgreSQL's client and server.
Any PostgreSQL client can connect to \fBpgpool\fR as if it's a real PostgreSQL server.
\fBpgpool\fR caches the connection to the PostgreSQL server to reduce the overhead
involved in establishing the connection to it.
.P
\fBpgpool\fR can also be
used with two PostgreSQL servers for fail over purposes.  If the first
server goes down, \fBpgpool\fR will automatically switch to the secondary server.
.P
\fBpgpool\fR is typically started and stopped via system initialization scripts.
.
.P
.SH INVOCATION
.TP
\fBpgpool\fP [ \fIoptions...\fP ]
Starts as a daemon in the background (unless \fB\-n\fR is given).
.TP
\fBpgpool\fP [ \fIoptions...\fP ] \fBstop\fP
Shutdown.
.TP
\fBpgpool\fP [ \fIoptions...\fP ] \fBreload\fP
Reloads the configuration.
.
.SH OPTIONS
.TP
\fB\-a\fR \fIpath\fR
.P
.B \--hba-file\fR \fIpath\fR
Sets the path to the \fIpool_hba.conf\fR configuration file (default: \fI@sysconfdir@/pgpool_hba.conf\fR).
.TP
\fB\-c\fR
.P
.B \--clear-cache
Clears the query cache.
.TP
\fB\-d\fR
.P
.B \--debug
Print lots of debug messages.
.TP
\fB\-f\fR \fIpath\fR
.P
.B \--config-file\fR \fIpath\fR
Sets the path to the \fIpgpool.conf\fR configuration file (default: \fI@sysconfdir@/pgpool.conf\fR).
.TP
\fB\-F\fR \fIpath\fR
.P
.B \--pcp-config-file\fR \fIpath\fR
Sets the path to the \fIpcp.conf\fR configuration file (default: \fI@sysconfdir@/pcp.conf\fR).
.TP
\fB\-h\fR
.P
.B \--help
Print a help message and exit.
.TP
\fB\-m\fR \fImode\fR
.P
.B \--mode\fR \fImode\fR
Shutdown mode: 
.B smart, fast, 
or
.BR immediate .
.TP
\fB\-n\fR
.P
.B \--no-daemon
Foreground mode.
Error messages go to stdout or stderr, which
could be piped out to log processors such as
.BR logger (1)
or
.BR rotatelogs (8).
To daemonize, explicitly invoke 
.B pgpool
in background.
.TP
.B \-v
.P
.B \--version
Print version and exit.
.
.SH FILES
.TP
\fI@sysconfdir@/pgpool.conf\fR
Default configuration file
.TP
\fI@sysconfdir@/pool_hba.conf\fR
Host Based Access configuration file
.TP
\fI@sysconfdir@/pcp.conf\fR
PCP commands configuration file
.SH SEE ALSO
.BR logger (1),
.BR postmaster (1),
.BR rotatelogs (8)
.PP
Additional information can be found in the \fBpgpool\fR \fIREADME\fR file.
