No subject


Sat Nov 16 19:48:32 JST 2013


* Incompatible changes
:
:
    - Recovery script now accepts 4 parameters, rather than 3 (the 4th
      parameter is the port number of master PostgreSQL). Existing
      3-parameter-style recovery scripts can be used if you don't care
      about information provided by the 4th parameter.

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

> Postgres log: ------------------
> 2014-11-12 21:43:36 EST template1 pgpool ERROR:  function
> pgpool_recovery(unknown, unknown, unknown, unknown) does not exist at
> character 8
> 
> 2014-11-12 21:43:36 EST template1 pgpool HINT:  No function matches the
> given name and argument types. You might need to add explicit type casts.
> 
> 2014-11-12 21:43:36 EST template1 pgpool STATEMENT:  SELECT
> pgpool_recovery('pgpool_basebackup', '10.0.51.62',
> '/var/lib/pgsql/data', '5432')
> 
> functions: ----------------------
> template1=# \ef pgpool_recovery
> No changes
> template1=# select proname,prosrc from pg_proc where proname like '%pool%';
>        proname       |       prosrc
> ---------------------+---------------------
>  pgpool_regclass     | pgpool_regclass
>  pgpool_recovery     | pgpool_recovery
>  pgpool_remote_start | pgpool_remote_start
>  pgpool_pgctl        | pgpool_pgctl
>  pgpool_switch_xlog  | pgpool_switch_xlog
> (5 rows)
> 
> Function: ---------------------
> template1=# \ef pgpool_recovery
> CREATE OR REPLACE FUNCTION public.pgpool_recovery(text, text, text)
>  RETURNS boolean
>  LANGUAGE c
>  STRICT
> AS '$libdir/pgpool-recovery', $function$pgpool_recovery$function$
> 
> 
> 
> 
> 
> On 11/12/14, 10:00 PM, Tatsuo Ishii wrote:
>> 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