[pgpool-committers: 2483] pgpool: Next in the series of overhauling the PCP library and utilities

Muhammad Usama m.usama at gmail.com
Fri Mar 6 19:55:13 JST 2015


Next in the series of overhauling the PCP library and utilities.

This list of some more prominent changes is as follows.

-- As currently pgpool-II has 12 PCP client utilities and almost 90% of the code
for these utilities was common, So this commit creates a single source file for
all the utilities, to make managing and maintenance of the utilities little easier.
New source file "src/tools/pcp/pcp_frontend_client.c" added by this commit is
now used for creating all PCP utilities.

-- Syntax is changed for all PCP utilities and PCP utilities now accepts long-options.
Also, almost all arguments to the utilities are assigned a default value which
is used if the particular argument is not supplied by the user.

-- The commit also solves the security issue existed in all PCP utilities,
which was due to the fact that all PCP commands accepts the password as an
argument which has a potential of being captured by 'ps' command.
Now PCP applications do not take password in an argument and it can be either
supplied by password prompt or utilities can read the password
from ". pcppass" file, which should be located in User's home directory
or can be specified by  PCPPASSFILE environment variable,
The password file format is "hostname:port:username:password"

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=accb2b28ca2fb19b4dda9c0ab6b0dc6e995730cd

Modified Files
--------------
configure                                          |    7 +
configure.ac                                       |    2 +-
src/include/config.h.in                            |    3 +
src/include/pcp/libpcp_ext.h                       |    2 +
src/include/utils/fe_ports.h                       |    3 +
src/include/utils/pool_path.h                      |    9 +-
src/libs/pcp/Makefile.am                           |    9 +-
src/libs/pcp/Makefile.in                           |   35 +-
src/libs/pcp/pcp.c                                 |  210 +++++-
src/pcp_con/pcp_worker.c                           |   12 +-
src/test/pgpool_setup                              |   19 +-
src/test/regression/tests/054.postgres_fdw/test.sh |    2 +-
src/tools/pcp/Makefile.am                          |   27 +-
src/tools/pcp/Makefile.in                          |   95 ++-
src/tools/pcp/pcp_attach_node.c                    |  140 ----
src/tools/pcp/pcp_detach_node.c                    |  152 ----
src/tools/pcp/pcp_frontend_client.c                |  775 ++++++++++++++++++++
src/tools/pcp/pcp_node_count.c                     |  139 ----
src/tools/pcp/pcp_node_info.c                      |  166 -----
src/tools/pcp/pcp_pool_status.c                    |  150 ----
src/tools/pcp/pcp_proc_count.c                     |  144 ----
src/tools/pcp/pcp_proc_info.c                      |  232 ------
src/tools/pcp/pcp_promote_node.c                   |  153 ----
src/tools/pcp/pcp_recovery_node.c                  |  142 ----
src/tools/pcp/pcp_stop_pgpool.c                    |  144 ----
src/tools/pcp/pcp_systemdb_info.c                  |  168 -----
src/tools/pcp/pcp_watchdog_info.c                  |  176 -----
src/utils/pool_path.c                              |   83 ++-
src/utils/sprompt.c                                |  204 ++++++
29 files changed, 1402 insertions(+), 2001 deletions(-)



More information about the pgpool-committers mailing list