Some code reorganization
authorMuhammad Usama <m.usama@highgo.ca>
Mon, 4 May 2020 11:35:35 +0000 (16:35 +0500)
committerMuhammad Usama <m.usama@gmail.com>
Mon, 4 May 2020 11:38:22 +0000 (16:38 +0500)
commit3c68ae5a36814349b42e279628e54106a9ab2483
treead976bc17312549e6b870554b597a58113682246
parent7c613feac40c9fba7b69ee08a321f664d389eabb
Some code reorganization

While working on the pcp_stop_pgpool command to implement cluster mode,
I realized that we have a lot of clutter in a few source files. Especially
pool.h header file. So I also did some code reorganization and added a
bunch of new includefiles in the hope to reduce the size of pool.h and
also get rid of too many global functions.

Along the way, I found out there are few other files that need a little
shredding as well, src/main/pgpool_main.c and src/protocol/child.c are at
the top of this wanted to be trimmed list. So as part of this commit.

I have taken a few things related to internal commands
(interface between the child processes can and Pgpool-II main process)
from pgpool_main.c file and moved them into new "src/main/pool_internal_comms.c"

Similarly, src/protocol/child.c had and still has so many functions that do
not fit with the personality of child.c file. So I have moved some of the
stuff related to DB functions info src/protocol/pool_pg_utils.c file.

Having done that I think this is still not enough and we may require another
round ( if someoneis willing to work on it) of a source file reorganization.
67 files changed:
src/Makefile.am
src/Makefile.in
src/auth/auth-scram.c
src/auth/pool_auth.c
src/auth/pool_hba.c
src/config/pool_config_variables.c
src/context/pool_process_context.c
src/context/pool_query_context.c
src/context/pool_session_context.c
src/include/auth/md5.h
src/include/auth/pool_auth.h [new file with mode: 0644]
src/include/context/pool_process_context.h
src/include/main/health_check.h [new file with mode: 0644]
src/include/main/pool_internal_comms.h [new file with mode: 0644]
src/include/pcp/pcp.h
src/include/pcp/pcp_stream.h
src/include/pcp/pcp_worker.h [new file with mode: 0644]
src/include/pcp/recovery.h [new file with mode: 0644]
src/include/pool.h
src/include/protocol/pool_connection_pool.h [new file with mode: 0644]
src/include/protocol/pool_pg_utils.h [new file with mode: 0644]
src/include/protocol/pool_process_query.h [new file with mode: 0644]
src/include/protocol/pool_proto_modules.h
src/include/utils/elog.h
src/include/utils/pool_ip.h
src/include/utils/pool_ipc.h
src/include/utils/pool_params.h [new file with mode: 0644]
src/include/utils/pool_signal.h
src/include/utils/pool_ssl.h [new file with mode: 0644]
src/include/utils/ps_status.h [new file with mode: 0644]
src/include/utils/socket_stream.h
src/include/utils/statistics.h [new file with mode: 0644]
src/include/watchdog/wd_commands.h
src/libs/pcp/Makefile.am
src/main/health_check.c
src/main/main.c
src/main/pgpool_main.c
src/main/pool_internal_comms.c [new file with mode: 0644]
src/pcp_con/pcp_child.c
src/pcp_con/pcp_worker.c
src/pcp_con/recovery.c
src/protocol/CommandComplete.c
src/protocol/child.c
src/protocol/pool_connection_pool.c
src/protocol/pool_pg_utils.c [new file with mode: 0644]
src/protocol/pool_process_query.c
src/protocol/pool_proto_modules.c
src/query_cache/pool_memqcache.c
src/rewrite/pool_lobj.c
src/rewrite/pool_timestamp.c
src/streaming_replication/pool_worker_child.c
src/test/regression/tests/010.rewrite_timestamp/timestamp/main.c
src/utils/pool_params.c
src/utils/pool_process_reporting.c
src/utils/pool_relcache.c
src/utils/pool_select_walker.c
src/utils/pool_signal.c
src/utils/pool_ssl.c
src/utils/pool_stream.c
src/utils/ps_status.c
src/utils/statistics.c
src/watchdog/watchdog.c
src/watchdog/wd_escalation.c
src/watchdog/wd_heartbeat.c
src/watchdog/wd_internal_commands.c
src/watchdog/wd_lifecheck.c
src/watchdog/wd_ping.c