mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(sysconfdir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_pgpool_OBJECTS = main.$(OBJEXT) child.$(OBJEXT) pool_auth.$(OBJEXT) \
LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
SOURCES = $(pgpool_SOURCES)
DIST_SOURCES = $(pgpool_SOURCES)
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man_MANS)
sysconfDATA_INSTALL = $(INSTALL_DATA)
DATA = $(sysconf_DATA)
ETAGS = etags
sysconf_DATA = pgpool.conf.sample
AM_CPPFLAGS = -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE
+man_MANS = pgpool.8
+CLEANFILES = pgpool.8
+EXTRA_DIST = pgpool.8.in
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@
rm -f $(LEX_OUTPUT_ROOT).c
uninstall-info-am:
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
+ @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.8*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 8*) ;; \
+ *) ext='8' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
+ done
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.8*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 8*) ;; \
+ *) ext='8' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
+ rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
+ done
install-sysconfDATA: $(sysconf_DATA)
@$(NORMAL_INSTALL)
test -z "$(sysconfdir)" || $(mkdir_p) "$(DESTDIR)$(sysconfdir)"
exit 1; } >&2
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS) $(DATA) config.h
+all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h
installdirs:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(sysconfdir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
info-am:
-install-data-am:
+install-data-am: install-man
install-exec-am: install-binPROGRAMS install-sysconfDATA
install-info: install-info-am
-install-man:
+install-man: install-man8
installcheck-am:
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man \
uninstall-sysconfDATA
+uninstall-man: uninstall-man8
+
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
- install-strip install-sysconfDATA installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
- ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-info-am uninstall-sysconfDATA
+ install-man8 install-strip install-sysconfDATA installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-info-am \
+ uninstall-man uninstall-man8 uninstall-sysconfDATA
+
+pgpool.8: pgpool.8.in
+ sed 's,@sysconfdir\@,$(sysconfdir),g' $< >$@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
--- /dev/null
+.\" Copyright 2004-2006 by Tatsuo Ishii, Peter Eisentraut
+.\" This man page is subject to the same license as the rest of pgpool.
+.\"
+.TH PGPOOL 8 "27 Jan 2006"
+.\" Please adjust this date whenever revising the manpage.
+.SH NAME
+pgpool \- PostgreSQL connection pool daemon
+.SH SYNOPSIS
+\fBpgpool\fR [ \fB\-d\fR ] [ \fB\-f\fR \fIfile\fR ] [ \fB\-n\fR ] [ \fB\-h\fR ]
+.LP
+\fBpgpool\fR [ \fB\-d\fR ] [ \fB\-f\fR \fIfile\fR ] [ \fB\-m\fR \fImode\fR ] \fBstop\fR
+.LP
+\fBpgpool\fR [ \fB\-d\fR ] [ \fB\-f\fR \fIfile\fR ] [ \fB\-m\fR \fImode\fR ] [ \fB-s\fR \fBm\fR[\fBaster\fR] | \fBs\fR[\fBecondary\fR] ] \fBswitch\fR
+.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. \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
+When started without arguments, \fBpgpool\fR starts as a daemon in the background.
+When started with the argument \fBstop\fR, \fBpgpool\fR is shut down.
+With the argument \fBswitch\fR, \fBpgpool\fR will switch between master
+and secondary servers. If only one server is configured, this will only
+restart the child processes.
+.P
+\fBpgpool\fR is typically started and stopped via system initialization scripts.
+.SH OPTIONS
+.TP
+\fB\-d\fR
+Print lots of debug messages.
+.TP
+\fB\-f\fR \fIpath\fR
+Sets the path to the configuration file (default: \fI@sysconfdir@/pgpool.conf\fR).
+.TP
+\fB\-h\fR
+Print a help message and exit.
+.TP
+\fB\-m\fR \fImode\fR
+Shutdown mode: smart, fast, or immediate.
+.TP
+\fB\-n\fR
+Do not start as daemon. Error messages go to stdout or stderr. Thus
+you could play with utilities such as \fBlogger\fR(1) and
+\fBrotatelogs\fR(8).
+You need to run in background explicitly if you use this option.
+.TP
+\fB-s\fR \fBm\fR[\fBaster\fR] | \fBs\fR[\fBecondary\fR]
+Determines which server to switch away from. If this option is omitted,
+the master goes down.
+.SH FILES
+.TP
+\fI@sysconfdir@/pgpool.conf\fR
+Default configuration file
+.SH SEE ALSO
+.BR logger (1),
+.BR postmaster (1),
+.BR rotatelogs (8)
+.PP
+Additional information can be found in the file \fBpgpool\fR \fIREADME\fR file.