[pgpool-committers: 2587] pgpool: Save pgpool_status to disk each time when it is changed.

Tatsuo Ishii ishii at postgresql.org
Thu Jul 9 13:27:20 JST 2015


Save pgpool_status to disk each time when it is changed.

Currently pgpool-II does not save pgpool_status file when it's
changed. Instead it saves when pgpool-II explicitly is going
shutdown. This is fine in most cases and it saves slight CPU cycles.
But what if pgpool-II killed abnormally? Or the system forces
pgpool-II to go down by OOM killer?  In these cases next pgpool-II
restarting could load obsolete status file.

This fix is a guard against such that situation by saving the
pgpool_status file each time when it's changed.

Branch
------
master

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

Modified Files
--------------
src/include/pool.h                  |    4 ++--
src/main/pgpool_main.c              |   22 ++++++++++++++++++----
src/protocol/pool_connection_pool.c |    2 ++
3 files changed, 22 insertions(+), 6 deletions(-)



More information about the pgpool-committers mailing list