From 3f4f4ef5fbc52e49b178ab9e23d720b014f98114 Mon Sep 17 00:00:00 2001 From: User yamaguti Date: Thu, 17 May 2007 04:46:47 +0000 Subject: [PATCH] * changed "enable_pool_hba" to be true by default. * install pgpool.pam for PAM configuration * updated NEWS, ChangeLog, README* --- ChangeLog | 13 ++++++++++ Makefile.am | 4 +++- Makefile.in | 59 +++++++++++++++++++++++++++++++++------------- NEWS | 4 ++++ README | 17 +++++++------ README.euc_jp | 21 +++++++++-------- pgpool.conf.sample | 6 ++--- pool_config.l | 2 +- 8 files changed, 87 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d51552..a7ac78d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2007-05-17 + * Version 3.3 + * Improve replication. SELECT nextval() and SELECT setval() are + now replicated. (Yoshiyuki) + * Change SELECT query is only sent to the master node. (Yoshiyuki) + - Use /*REPLICATION*/ comment to repliate a SELECT query. + * Fix unexpected failover error due to receiving an interrupt + signal while connecting to the backend. (Yoshiyuki) + * Fix "ps" output to follow PostgreSQL's output. (Taiki) + * Change the default value for enable_pool_hba to true. (Taiki) + * Add "pgpool.pam" file, for PAM configuration file, to be + installed under "$PREFIX/share/". (Taiki) + 2007-02-10 * Version 3.2 * Support HBA authentication(Taiki) diff --git a/Makefile.am b/Makefile.am index 2e97714..2bdb47a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,13 +6,15 @@ pgpool_SOURCES = pool.h version.h pgpool.conf.sample \ pool_process_query.c pool_stream.c pool_connection_pool.c pool_params.c \ pool_signal.h pool_signal.c ps_status.c strlcpy.c \ pool_hba.c pool_list.h pool_list.c pool_path.h pool_path.c \ - pool_type.h pool_ip.h pool_ip.c pool_hba.conf.sample + pool_type.h pool_ip.h pool_ip.c pool_hba.conf.sample pgpool.pam DEFS = @DEFS@ \ -DDEFAULT_CONFIGDIR=\"$(sysconfdir)\" sysconf_DATA = pgpool.conf.sample pool_hba.conf.sample +data_DATA = pgpool.pam + AM_CPPFLAGS = -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE man_MANS = pgpool.8 diff --git a/Makefile.in b/Makefile.in index 1d34735..663c2ba 100644 --- a/Makefile.in +++ b/Makefile.in @@ -52,7 +52,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)" \ - "$(DESTDIR)$(sysconfdir)" + "$(DESTDIR)$(datadir)" "$(DESTDIR)$(sysconfdir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_pgpool_OBJECTS = main.$(OBJEXT) child.$(OBJEXT) pool_auth.$(OBJEXT) \ @@ -83,8 +83,9 @@ am__vpath_adj = case $$p in \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +dataDATA_INSTALL = $(INSTALL_DATA) sysconfDATA_INSTALL = $(INSTALL_DATA) -DATA = $(sysconf_DATA) +DATA = $(data_DATA) $(sysconf_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -121,6 +122,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -147,7 +149,6 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ @@ -158,19 +159,26 @@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ @@ -181,9 +189,10 @@ pgpool_SOURCES = pool.h version.h pgpool.conf.sample \ pool_process_query.c pool_stream.c pool_connection_pool.c pool_params.c \ pool_signal.h pool_signal.c ps_status.c strlcpy.c \ pool_hba.c pool_list.h pool_list.c pool_path.h pool_path.c \ - pool_type.h pool_ip.h pool_ip.c pool_hba.conf.sample + pool_type.h pool_ip.h pool_ip.c pool_hba.conf.sample pgpool.pam sysconf_DATA = pgpool.conf.sample pool_hba.conf.sample +data_DATA = pgpool.pam AM_CPPFLAGS = -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE man_MANS = pgpool.8 CLEANFILES = pgpool.8 @@ -357,6 +366,23 @@ uninstall-man8: echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ done +install-dataDATA: $(data_DATA) + @$(NORMAL_INSTALL) + test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)" + @list='$(data_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \ + $(dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \ + done + +uninstall-dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(data_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \ + rm -f "$(DESTDIR)$(datadir)/$$f"; \ + done install-sysconfDATA: $(sysconf_DATA) @$(NORMAL_INSTALL) test -z "$(sysconfdir)" || $(mkdir_p) "$(DESTDIR)$(sysconfdir)" @@ -553,7 +579,7 @@ check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(sysconfdir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(datadir)" "$(DESTDIR)$(sysconfdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am @@ -603,7 +629,7 @@ info: info-am info-am: -install-data-am: install-man +install-data-am: install-dataDATA install-man install-exec-am: install-binPROGRAMS install-sysconfDATA @@ -632,8 +658,8 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man \ - uninstall-sysconfDATA +uninstall-am: uninstall-binPROGRAMS uninstall-dataDATA \ + uninstall-info-am uninstall-man uninstall-sysconfDATA uninstall-man: uninstall-man8 @@ -643,14 +669,15 @@ uninstall-man: uninstall-man8 distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ 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-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 + install-binPROGRAMS install-data install-data-am \ + install-dataDATA install-exec install-exec-am install-info \ + install-info-am install-man 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-dataDATA uninstall-info-am uninstall-man \ + uninstall-man8 uninstall-sysconfDATA pgpool.8: pgpool.8.in diff --git a/NEWS b/NEWS index 2782967..59427bf 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,10 @@ postgres: user database host status ¤È¤¤¤¦½çÈÖ¤ËÊѹ¹(Taiki) + o enable_pool_hba ¤ò¥Ç¥Õ¥©¥ë¥È¤Ç true ¤ËÊѹ¹(Taiki) + + o PAM ǧ¾Ú¤Î¥µ¥ó¥×¥ë¥Õ¥¡¥¤¥ë pgpool.pam ¤ò share/ ¤Ë¥¤¥ó¥¹¥È¡¼¥ë + ¤µ¤ì¤ë¤è¤¦¤Ë¤·¤¿(Taiki) 3.2(kalekale) 2007/2/10 o HBAǧ¾Ú¤ò¥µ¥Ý¡¼¥È¤·¤¿(Taiki) diff --git a/README b/README index 8c06217..62e286d 100644 --- a/README +++ b/README @@ -487,10 +487,8 @@ pgpool version 3.2 README enable_pool_hba - If true, use pool_hba.conf for client authentication. In pgpool 3.2, - the default value is false. This parameter is planned to be deleted - in the next version of pgpool, and pool_hba.conf will always be used. - See "7. Setting up pool_hba.conf for client authentication". + If true, use pool_hba.conf for client authentication. See + "7. Setting up pool_hba.conf for client authentication". 7. Setting up pool_hba.conf for client authentication (HBA) @@ -503,9 +501,8 @@ pgpool version 3.2 README files. Copy pool_hba.conf.sample as pool_hba.conf and edit it if necessary. - By default, pool_hba authentication is disabled for backward - compatibility. To enable it, set enable_pool_hba to true in - pgpool.conf. See "6. Setting up pgpool.conf" for more detail. + By default, pool_hba authentication is enabled. See "6. Setting up + pgpool.conf" for more detail. The format of pool_hba.conf file follows very closely to pg_hba.conf. @@ -555,6 +552,12 @@ pgpool version 3.2 README configure --with-pam + To enable PAM authentication, you need to create a + service-configuration file for pgpool in the system's PAM + configuration directory (which is usually at "/etc/pam.d"). A sample + service-configuration file is installed as "share/pgpool.pam" under + the install directory. + 8. Starting pgpool The simplist way to start pgpool is: diff --git a/README.euc_jp b/README.euc_jp index c918a8d..5472682 100644 --- a/README.euc_jp +++ b/README.euc_jp @@ -690,13 +690,11 @@ pgpool version 3.2(kalekale) README ¤òɽ¼¨¤·¤Þ¤¹¡¥¤Þ¤¿¡¤log_connections¤¬Í­¸ú¤Ê¾ì¹ç¤Ë¤Ï¥í¥°¤Ë¥Û¥¹¥È̾¤ò ½ÐÎϤ·¤Þ¤¹¡¥ - enable_pool_conf + enable_pool_hba - true¤Ê¤é¤Ð¡¢pool_hba.conf¤Ë½¾¤Ã¤Æ¥¯¥é¥¤¥¢¥ó¥Èǧ¾Ú¤ò¹Ô¤¤¤Þ¤¹¡£pgpool - 3.2¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤÏfalse¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤¬¡¢¼¡¤Î¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Ç - ¤Ï¤³¤Î¥Ñ¥é¥á¡¼¥¿¤Ïºï½ü¤µ¤ì¡¢¾ï¤Ëpool_hba.conf¤Ë¤è¤ë¥¯¥é¥¤¥ó¥¢¥ó¥Èǧ - ¾Ú¤¬¹Ô¤ï¤ì¤ëͽÄê¤Ç¤¹¡£¾ÜºÙ¤Ï¡Ö7. ¥¯¥é¥¤¥¢¥ó¥Èǧ¾Ú(HBA)¤Î¤¿¤á¤Î - pool_hba.confÀßÄêÊýË¡¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ + true¤Ê¤é¤Ð¡¢pool_hba.conf¤Ë½¾¤Ã¤Æ¥¯¥é¥¤¥¢¥ó¥Èǧ¾Ú¤ò¹Ô¤¤¤Þ¤¹¡£ + ¾ÜºÙ¤Ï¡Ö7. ¥¯¥é¥¤¥¢¥ó¥Èǧ¾Ú(HBA)¤Î¤¿¤á¤Îpool_hba.confÀßÄêÊýË¡¡×¤ò»² + ¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ 7. ¥¯¥é¥¤¥¢¥ó¥Èǧ¾Ú(HBA)¤Î¤¿¤á¤Î pool_hba.conf ÀßÄêÊýË¡ @@ -708,10 +706,8 @@ pgpool version 3.2(kalekale) README ¤µ¤ì¤Þ¤¹¡£ ¤³¤Îpool_hba.conf.sample¥Õ¥¡¥¤¥ë¤òpool_hba.conf¤È¤·¤Æ¥³¥Ô¡¼¤·¡¢É¬Í× - ¤Ç¤¢¤ì¤ÐÊÔ½¸¤·¤Æ¤¯¤À¤µ¤¤¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ïpool_hba¤Ë¤è¤ëǧ¾Ú¤Ï̵¸ú¤Ë - ¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï°ÊÁ°¤Îpgpool¤È¤Î¸ß´¹À­¤òÊݤĤ¿¤á¤Ç¤¹¡£Í­¸ú¤Ë¤¹ - ¤ë¤¿¤á¤Ë¤Ïpgpool.conf¤Îenable_pool_hba¤òtrue¤ËÀßÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ - ¤¹¡£ + ¤Ç¤¢¤ì¤ÐÊÔ½¸¤·¤Æ¤¯¤À¤µ¤¤¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ïpool_hba¤Ë¤è¤ëǧ¾Ú¤ÏÍ­¸ú¤Ë + ¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ pool_hba.conf¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Ïpg_hba.conf¤Î¤â¤Î¤È¤Û¤È¤ó¤ÉƱ¤¸¤Ç¤¹¡£ @@ -765,6 +761,11 @@ pgpool version 3.2(kalekale) README ./configure --with-pam + ¼ÂºÝ¤ËPAMǧ¾Ú¤òÍ­¸ú¤Ë¤¹¤ë¤Ë¤Ï¡¢pool_hba.conf¤Ç"pam"¥á¥½¥Ã¥É¤òÀßÄꤹ + ¤ë¤Î¤Ë²Ã¤¨¡¢pgpool¤Î¥µ¡¼¥Ó¥¹ÀßÄê¥Õ¥¡¥¤¥ë¤ò¥·¥¹¥Æ¥à¤ÎPAMÀßÄê¥Ç¥£¥ì¥¯¥È + ¥ê¤ËºîÀ®¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥µ¡¼¥Ó¥¹ÀßÄê¥Õ¥¡¥¤¥ë¤ÎÎã¤Ï¥¤¥ó¥¹¥È¡¼¥ë + ¥Ç¥£¥ì¥¯¥È¥ê¤Î"share/pgpool.pam"¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£ + 8. pgpool¤Îµ¯Æ° pgpool¤òµ¯Æ°¤¹¤ë¤â¤Ã¤È¤â´Êñ¤ÊÊýË¡¤Ï¡¤ diff --git a/pgpool.conf.sample b/pgpool.conf.sample index ad5d851..948eae9 100644 --- a/pgpool.conf.sample +++ b/pgpool.conf.sample @@ -135,7 +135,5 @@ log_hostname = false # - HBA - -# If true, use pool_hba.conf for client authentication. In pgpool 3.2, -# the default value is false. This parameter is planned to be deleted -# in pgpool 3.3, and pool_hba.conf will always be used. -enable_pool_hba = false +# If true, use pool_hba.conf for client authentication. +enable_pool_hba = true diff --git a/pool_config.l b/pool_config.l index 97cba2c..cae21af 100644 --- a/pool_config.l +++ b/pool_config.l @@ -140,7 +140,7 @@ int pool_get_config(char *confpath) pool_config.log_statement = 0; pool_config.log_connections = 0; pool_config.log_hostname = 0; - pool_config.enable_pool_hba = 0; + pool_config.enable_pool_hba = 1; #define PARSE_ERROR() pool_error("pool_config: parse error at line %d '%s'", Lineno, yytext) /* open config file */ -- 2.39.5