No Description
Muhammad Usama 4cde5da1b4 Fixing 0000455: watchdog lifecheck process has segfalut in query mode 3 days ago
doc Doc: fix typo in logdir description. 2 weeks ago
doc.ja Doc: fix typo in logdir description. 2 weeks ago
m4 Allow to create man pages from SGML. 2 years ago
src Fixing 0000455: watchdog lifecheck process has segfalut in query mode 3 days ago
.gitignore Add .gitignore files. 5 months ago
AUTHORS pgpool-II initial release 12 years ago
COPYING Prepare 3.5RC1 3 years ago
ChangeLog Remove outdated contents of ChangeLog and replace it with 6 years ago
INSTALL Apply code reorganization maga patch from Muhammad Usama. 5 years ago
Makefile.am Improve Makefiles. 1 year ago
Makefile.in Feature: Add SCRAM and Certificate authentication support 5 months ago
NEWS Prepare 3.6 alpha1 2 years ago
README Update README. 12 years ago
README.build Add info about tool chanin version. 4 years ago
README.euc_jp * Rename `doc/pgpool.html' to `doc/pgpool-ja.html'. 12 years ago
README.online-recovery Internal document for online recovery 9 years ago
TODO Update TODO. 8 years ago
ac_func_accept_argtypes.m4 new files for HBA, ps display, log_hostname & log_connections 11 years ago
aclocal.m4 Feature: Add SCRAM and Certificate authentication support 5 months ago
c-compiler.m4 Fix bugtrack [#1010740] BigInt distortion in pgpool-II 2.3 version, 9 years ago
c-library.m4 Fix bugtrack [#1010740] BigInt distortion in pgpool-II 2.3 version, 9 years ago
compile Fix build error. 4 years ago
config.guess Apply code reorganization maga patch from Muhammad Usama. 5 years ago
config.sub Apply code reorganization maga patch from Muhammad Usama. 5 years ago
configure Start 4.1 development. 2 months ago
configure.ac Start 4.1 development. 2 months ago
depcomp Apply code reorganization maga patch from Muhammad Usama. 5 years ago
general.m4 Fix bugtrack [#1010740] BigInt distortion in pgpool-II 2.3 version, 9 years ago
install-sh Apply code reorganization maga patch from Muhammad Usama. 5 years ago
ltmain.sh Apply code reorganization maga patch from Muhammad Usama. 5 years ago
missing Apply code reorganization maga patch from Muhammad Usama. 5 years ago
mkinstalldirs Apply code reorganization maga patch from Muhammad Usama. 5 years ago
ylwrap Apply code reorganization maga patch from Muhammad Usama. 5 years ago

README.online-recovery

/*
* $Header$
*
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
* Copyright (c) 2003-2010 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
* copies and that both that copyright notice and this permission
* notice appear in supporting documentation, and that the name of the
* author not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. The author makes no representations about the
* suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
*/

How does online reconvery work?

pcp_recovery_node calls pcp_recovery_node() API

pcp_recovery_node(int node_id) does:

pcp_recovery_node sends "O" to pcp_child process requesting online
recovery

pcp_child calls start_recovery() and waits for its completion

start_recovery() sets Req_info->kind to NODE_RECOVERY_REQUEST
start_recovery calls execute_checkpoint() execute CHEKPOINT
command
start_recovery calls exec_recovery
exec_recovery executes SELECT pgpool_recovery()
execute 1st stage command

/* start 2nd stage */
sets InRecovery to 1
wait_connection_closed() to wait for all frontend exits
calls execute_checkpoint() execute CHEKPOINT
calls exec_recovery to execute 2nd stage script
calls exec_remote_start to start postmaster
calls check_postmaster_started to wait for postmaster starts
up
set pcp_wakeup request to 0
calls send_failback_request()
waits for failback completion every 1 second until
pcp_wakeup_request becomes non 0.
set pcp_wakeup request to 0

start_recovery calls finish_recovery()
finish_recovery sets InRecovery to 0
sends SIGUSR2 signal to parent

Upon receiving SIGUSR2 pgpool parent calls
kill_all_children() which sends SIGUSR2 to all pgpool
children

child pgpool processes wake up from pause()