[pgpool-committers: 2443] pgpool: Second part of overhauling the PCP library and utilities.

Muhammad Usama m.usama at gmail.com
Tue Feb 17 23:33:31 JST 2015


Second part of overhauling the PCP library and utilities.

This commit contains the following changes

-- pgpool-II can now handle multiple simultaneous PCP commands.

-- pcp_child process now only listens for new connections and manages pcp_worker
children. Responsibility of authenticating PCP clients and processing of the
PCP client request is delegated to new PCP worker type process.
Which are spawned on demand when the new command request is received

-- This commit changes the way how smart shutdown request is handled by the
PCP process. Previously pcp_child was not caring about if smart or fast shutdown
request was issued, and kills the process instantly. This commit ensures that if
a smart shutdown request was received than the pcp_child stops receiving the
new PCP connections, but the current command in execution executes at full
before the processing of the shutdown request.

-- Restart pcp_child request now waits for the current command to complete
before restarting the process, instead of immediately killing the PCP process.

-- Removes all occurrences and handling of unused pcp_timeout from code and
command line arguments of PCP utilities. (Documentation changes are still a TODO)

-- Removes the global variable run_as_pcp_child which was already never used.

-- pgpool-II can now execute multiple concurrent PCP commands except for
pcp_recovery_node command.(only one pcp_recovery_node is allowed at a time).

-- Since pcp_conf_file is the global parameter so instead of passing it to the
pcp_child main process as an argument it is extended in the pcp_worker file.

-- Removes now unwanted utils/pcp/pcp_error.c and  utils/pcp/pcp_timeout.c files.

-- Commit also contains some miscellaneous code cleanups.

Branch
------
master

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

Modified Files
--------------
src/Makefile.am                                    |    3 +-
src/Makefile.in                                    |   23 +-
src/auth/pool_hba.c                                |    6 +-
src/config/pool_config.c                           |   16 -
src/config/pool_config.l                           |   16 -
src/include/pcp/libpcp_ext.h                       |    4 -
src/include/pcp/pcp.h                              |   21 +-
src/include/pool.h                                 |   21 +-
src/include/pool_config.h                          |    1 -
src/include/utils/pool_signal.h                    |   17 +-
src/libs/pcp/Makefile.am                           |    2 -
src/libs/pcp/Makefile.in                           |    7 +-
src/libs/pcp/pcp.c                                 |    9 -
src/main/pgpool_main.c                             |   17 +-
src/main/pool_globals.c                            |    2 -
src/pcp_con/pcp_child.c                            | 1522 +++-----------------
src/pcp_con/pcp_worker.c                           | 1419 ++++++++++++++++++
src/pcp_con/recovery.c                             |    8 +-
src/protocol/child.c                               |   18 +-
src/protocol/pool_connection_pool.c                |    6 +-
src/protocol/pool_process_query.c                  |    6 +-
src/query_cache/pool_memqcache.c                   |   36 +-
src/test/pgpool_setup                              |    4 +-
src/test/regression/tests/054.postgres_fdw/test.sh |    2 +-
src/tools/pcp/pcp_attach_node.c                    |   28 +-
src/tools/pcp/pcp_detach_node.c                    |   28 +-
src/tools/pcp/pcp_node_count.c                     |   27 +-
src/tools/pcp/pcp_node_info.c                      |   27 +-
src/tools/pcp/pcp_pool_status.c                    |   27 +-
src/tools/pcp/pcp_proc_count.c                     |   26 +-
src/tools/pcp/pcp_proc_info.c                      |   30 +-
src/tools/pcp/pcp_promote_node.c                   |   28 +-
src/tools/pcp/pcp_recovery_node.c                  |   28 +-
src/tools/pcp/pcp_stop_pgpool.c                    |   35 +-
src/tools/pcp/pcp_systemdb_info.c                  |   24 +-
src/tools/pcp/pcp_watchdog_info.c                  |   30 +-
src/tools/pgmd5/pool_config.c                      |  117 +-
src/utils/error/elog.c                             |    3 +
src/utils/pcp/pcp_error.c                          |   87 --
src/utils/pcp/pcp_stream.c                         |   36 +-
src/utils/pcp/pcp_timeout.c                        |   12 -
src/utils/pool_process_reporting.c                 |    6 +-
src/utils/pool_signal.c                            |    5 +-
src/watchdog/test/stab.c                           |    7 +-
44 files changed, 1927 insertions(+), 1870 deletions(-)



More information about the pgpool-committers mailing list