From 625c94c21a35fe474fa9e33962a05a6a63e2fd42 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Fri, 27 Jan 2006 23:42:38 +0000 Subject: [PATCH] Add pgpool's man page. contributed by Peter Eisentra. --- Makefile.am | 8 ++++++ Makefile.in | 80 +++++++++++++++++++++++++++++++++++++++++++++-------- pgpool.8.in | 62 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 139 insertions(+), 11 deletions(-) create mode 100644 pgpool.8.in diff --git a/Makefile.am b/Makefile.am index 90bb5c2..e5dbdff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,3 +12,11 @@ DEFS = @DEFS@ \ sysconf_DATA = pgpool.conf.sample AM_CPPFLAGS = -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE + +man_MANS = pgpool.8 + +pgpool.8: pgpool.8.in + sed 's,@sysconfdir\@,$(sysconfdir),g' $< >$@ + +CLEANFILES = pgpool.8 +EXTRA_DIST = pgpool.8.in diff --git a/Makefile.in b/Makefile.in index a4d4263..c02d265 100644 --- a/Makefile.in +++ b/Makefile.in @@ -52,7 +52,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 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) \ @@ -81,6 +81,9 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 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 @@ -179,6 +182,9 @@ pgpool_SOURCES = pool.h version.h pgpool.conf.sample \ 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 @@ -299,6 +305,51 @@ distclean-compile: 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)" @@ -493,9 +544,9 @@ distcleancheck: distclean 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 @@ -515,6 +566,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) @@ -544,13 +596,13 @@ info: info-am 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: @@ -573,9 +625,11 @@ ps: ps-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 \ @@ -584,12 +638,16 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am \ 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: diff --git a/pgpool.8.in b/pgpool.8.in new file mode 100644 index 0000000..b89d5b4 --- /dev/null +++ b/pgpool.8.in @@ -0,0 +1,62 @@ +.\" 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. -- 2.39.5