[pgpool-general: 3269] Re: Execution of command failed

Tatsuo Ishii ishii at postgresql.org
Thu Nov 13 12:00:22 JST 2014


Not sure why you reached the conclusion because the log stated that
pgpool tried to execute the first stage command but failed...

Maybe you misunderstand the concept of the recovery 1st stage command?

1) pgpol sends query to master "SELECT pgpool_recovery(..."

2) master executes the SELECT command.

3) function pgpool_recovery is called on the master

4) pgpool_recovery() tries to execute specified command
   ("pgpool_basebackup" in your case)

I suggest to look into PostgreSQL log on the master.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Hello
> 
> 
> I'm testing pgpool and it appears that pgpool never actually calls the
> first stage script.
> 
> I've added logging to the first stage script and it never logs that it
> has been called.
> 
> Any ideas?
> 
> pgpool-II-3.4.0
> openSUSE 13.2 (x86_64)
> postgresql-server-9.3-3.1.2.noarch
> 
> 
> This is the error I get from pcp_reconvery_node:
> 
> DEBUG: send: tos="R", len=44
> DEBUG: recv: tos="r", len=21, data=AuthenticationOK
> DEBUG: send: tos="D", len=6
> DEBUG: recv: tos="e", len=20, data=recovery failed
> DEBUG: command failed. reason=recovery failed
> BackendError
> DEBUG: send: tos="X", len=4
> 
> 
> 
> And strace pgpool -nD returns this:
> 
> 14-11-12 21:43:36: pid 21023: LOG:  starting recovering node 1
> 2014-11-12 21:43:36: pid 21023: LOG:  executing recovery
> 2014-11-12 21:43:36: pid 21023: DETAIL:  starting recovery command:
> "SELECT pgpool_recovery('pgpool_basebackup', '10.0.51.62',
> '/var/lib/pgsql/data', '5432')"
> 2014-11-12 21:43:36: pid 21023: LOG:  executing recovery
> 2014-11-12 21:43:36: pid 21023: DETAIL:  disabling statement_timeout
> 2014-11-12 21:43:36: pid 21023: ERROR:  executing recovery, execution of
> command failed at "1st stage"
> 2014-11-12 21:43:36: pid 21023: DETAIL:  command:"pgpool_basebackup"
> ) = ? ERESTARTNOHAND (To be restarted if no handler)
> --- SIGUSR2 {si_signo=SIGUSR2, si_code=SI_USER, si_pid=21023, si_uid=0} ---
> rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN
> RT_1], NULL, 8) = 0
> write(8, "\0", 1)                       = 1
> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> rt_sigreturn()                          = -1 EINTR (Interrupted system call)
> rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN
> RT_1], NULL, 8) = 0
> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> gettimeofday({1415846616, 459894}, NULL) = 0
> select(8, [7], NULL, NULL, {84, 116932}) = 1 (in [7], left {84, 116930})
> read(7, "\0", 1)                        = 1
> rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN
> RT_1], NULL, 8) = 0
> kill(20928, SIGUSR2)                    = 0
> kill(20929, SIGUSR2)                    = 0
> ...
> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
> gettimeofday({1415846616, 474081}, NULL) = 0
> select(8, [7], NULL, NULL, {84, 102745}
> 
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general


More information about the pgpool-general mailing list