<div dir="ltr"><div><div><div>Ok, i did it.<br><br>Thanks for help, <br></div>there was probably some other problem with wal settings and connection. Now slave is in &quot;t&quot; when calling pg_is_in_recovery() and everything seems to be ok.<br></div><div><br></div><div>Now i have only few questions:<br></div><div>1] Can I use more slaves than one? Like backend1,backand2 and so on?<br></div><div>2] When i set loadbalancing mode to on, will pgpool server use all servers (master and slaves) for balancing read queries?<br><br></div><div>Again, <br>thanks for your help,<br>Michal Stava<br></div></div><br><br><div><div><div><div><div><div><div><div><div><div><br><div><div><div class="gmail_extra"><div class="gmail_quote">2014-12-03 12:43 GMT+01:00 Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>&gt; Both backends returns this (f):<br>
&gt;<br>
&gt; # psql -U postgres -h 10.18.1.14 -p 5444 postgres<br>
&gt; psql (9.3.5)<br>
&gt; Type &quot;help&quot; for help.<br>
&gt;<br>
&gt; postgres=# select pg_is_in_recovery();<br>
&gt;  pg_is_in_recovery<br>
&gt; -------------------<br>
&gt;  f<br>
&gt; (1 row)<br>
<br>
</span>So node 1 works as primary (or standalone PostgreSQL).<br>
<div><div><br>
&gt; # psql -U postgres -h 10.18.1.13 -p 5444 postgres<br>
&gt; psql (9.3.5)<br>
&gt; Type &quot;help&quot; for help.<br>
&gt;<br>
&gt; postgres=# select pg_is_in_recovery();<br>
&gt;  pg_is_in_recovery<br>
&gt; -------------------<br>
&gt;  f<br>
&gt; (1 row)<br>
&gt;<br>
&gt; and for command (call pcp on pgpool server port 9898):<br>
&gt; pcp_recovery_node -d 30 localhost 9898 postgres password 1<br>
&gt;<br>
&gt; i get from log this:<br>
&gt; DEBUG: send: tos=&quot;R&quot;, len=46<br>
&gt; DEBUG: recv: tos=&quot;r&quot;, len=21, data=AuthenticationOK<br>
&gt; DEBUG: send: tos=&quot;D&quot;, len=6<br>
&gt; DEBUG: recv: tos=&quot;e&quot;, len=20, data=recovery failed<br>
&gt; DEBUG: command failed. reason=recovery failed<br>
&gt; BackendError<br>
&gt; DEBUG: send: tos=&quot;X&quot;, len=4<br>
&gt;<br>
&gt; 2014-12-03 12:31:27: pid 21555: DEBUG:  received PCP packet<br>
&gt; 2014-12-03 12:31:27: pid 21555: DETAIL:  PCP packet type of service &#39;M&#39;<br>
&gt; 2014-12-03 12:31:27: pid 21555: DEBUG:  PCP: sent md5 salt to client<br>
&gt; 2014-12-03 12:31:27: pid 21555: DEBUG:  initializing backend status<br>
&gt; 2014-12-03 12:31:27: pid 21555: DEBUG:  received PCP packet<br>
&gt; 2014-12-03 12:31:27: pid 21555: DETAIL:  PCP packet type of service &#39;R&#39;<br>
&gt; 2014-12-03 12:31:27: pid 21555: DEBUG:  PCP: processing authentication<br>
&gt; request<br>
&gt; 2014-12-03 12:31:27: pid 21555: DETAIL:  authentication OK<br>
&gt; 2014-12-03 12:31:27: pid 21555: DEBUG:  initializing backend status<br>
&gt; 2014-12-03 12:31:27: pid 21555: DEBUG:  received PCP packet<br>
&gt; 2014-12-03 12:31:27: pid 21555: DETAIL:  PCP packet type of service &#39;O&#39;<br>
&gt; 2014-12-03 12:31:27: pid 21555: DEBUG:  PCP: processing recovery request<br>
&gt; 2014-12-03 12:31:27: pid 21555: DETAIL:  start online recovery<br>
&gt; 2014-12-03 12:31:27: pid 21555: LOG:  starting recovering node 1<br>
&gt; 2014-12-03 12:31:27: pid 21555: ERROR:  node recovery failed, node id: 1 is<br>
&gt; alive<br>
&gt; 2014-12-03 12:31:27: pid 21555: DEBUG:  initializing backend status<br>
<br>
</div></div>You need to shutdown node 1 PostgreSQL before doing pcp_recovery_node.<br>
<div><div><br>
&gt; for node 0 i get info that primary not cannot be recovery. That is probably<br>
&gt; ok.<br>
&gt;<br>
&gt; There is info about backends from pgpool.conf:<br>
&gt; backend_hostname0 = &#39;10.18.1.13&#39;<br>
&gt; backend_port0 = 5444<br>
&gt; backend_weight0 = 1<br>
&gt; backend_data_directory0 = &#39;/home/postgres/data&#39;<br>
&gt; backend_flag0 = &#39;ALLOW_TO_FAILOVER&#39;<br>
&gt;<br>
&gt; backend_hostname1 = &#39;10.18.1.14&#39;<br>
&gt; backend_port1 = 5444<br>
&gt; backend_weight1 = 1<br>
&gt; backend_data_directory1 = &#39;/home/postgres/data/&#39;<br>
&gt; backend_flag1 = &#39;ALLOW_TO_FAILOVER&#39;<br>
&gt;<br>
&gt; Thanks again for helping,<br>
&gt; Michal Stava<br>
&gt;<br>
&gt; 2014-12-03 12:25 GMT+01:00 Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;:<br>
&gt;<br>
&gt;&gt; Ok, probably node 1 is out of sync or streaming replication is not<br>
&gt;&gt; working. To confirm you type:<br>
&gt;&gt;<br>
&gt;&gt; psql -h 10.18.1.14 -p 5444 postgres<br>
&gt;&gt;<br>
&gt;&gt; then<br>
&gt;&gt;<br>
&gt;&gt; select pg_is_in_recovery();<br>
&gt;&gt;<br>
&gt;&gt; If it returns t, it works as standby. If not, you could resync the<br>
&gt;&gt; standby by using pcp_recovery_command.<br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt;<br>
&gt;&gt; &gt; %/home/postgres/config# psql -p 9999 -U postgres -h localhost<br>
&gt;&gt; &gt; psql (9.3.5)<br>
&gt;&gt; &gt; Type &quot;help&quot; for help.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; postgres=# show pool_nodes;<br>
&gt;&gt; &gt;  node_id |  hostname  | port | status | lb_weight |  role<br>
&gt;&gt; &gt; ---------+------------+------+--------+-----------+---------<br>
&gt;&gt; &gt;  0       | 10.18.1.13 | 5444 | 2      | 0.500000  | primary<br>
&gt;&gt; &gt;  1       | 10.18.1.14 | 5444 | 2      | 0.500000  | standby<br>
&gt;&gt; &gt; (2 rows)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 2014-12-03 12:11 GMT+01:00 Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; What does &quot;show pool_nodes&quot; show?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Best regards,<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Tatsuo Ishii<br>
&gt;&gt; &gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; &gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt; &gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt; Hi Tatsuo,<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; this tutorial i tried before using replication mode. But there is one<br>
&gt;&gt; &gt;&gt; &gt; problem i can&#39;t figure.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; I have master and slave server but only master is accepting my<br>
&gt;&gt; queries.<br>
&gt;&gt; &gt;&gt; If<br>
&gt;&gt; &gt;&gt; &gt; i try to create new db by:<br>
&gt;&gt; &gt;&gt; &gt; createdb -p 9999 -U postgres -h localhost DB5<br>
&gt;&gt; &gt;&gt; &gt; on pgpool-II server, i get info below from log but only master create<br>
&gt;&gt; &gt;&gt; this<br>
&gt;&gt; &gt;&gt; &gt; DB5. If i try to connect by pgpool-II to this new db, i get another<br>
&gt;&gt; info<br>
&gt;&gt; &gt;&gt; &gt; below.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Is there anything i am doing wrong?<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; PS:<br>
&gt;&gt; &gt;&gt; &gt; both are hot_standby and use configuration from manual, only<br>
&gt;&gt; pg_hba.conf<br>
&gt;&gt; &gt;&gt; is<br>
&gt;&gt; &gt;&gt; &gt; set to specific hosts for trust reading all databases from postgres<br>
&gt;&gt; and<br>
&gt;&gt; &gt;&gt; &gt; also trust replication<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Thanks,<br>
&gt;&gt; &gt;&gt; &gt; Michal Stava<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; LOG when connecting new DB:<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:55:28: pid 21237: LOG:  pool_read_kind: error message<br>
&gt;&gt; from<br>
&gt;&gt; &gt;&gt; &gt; 1 th backend:database &quot;DB5&quot; does not exist<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:55:28: pid 21237: ERROR:  unable to read message kind<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:55:28: pid 21237: DETAIL:  kind does not match between<br>
&gt;&gt; &gt;&gt; &gt; master(53) slot[1] (45)<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; LOG when creating new DB:<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  I am 21153 accept fd 11<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading startup packet<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  Protocol Major: 1234 Minor:<br>
&gt;&gt; 5679<br>
&gt;&gt; &gt;&gt; &gt; database:  user:<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  selecting backend connection<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  SSLRequest from client<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  SSL is requested but SSL<br>
&gt;&gt; support<br>
&gt;&gt; &gt;&gt; is<br>
&gt;&gt; &gt;&gt; &gt; not available<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading startup packet<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  application_name: createdb<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading startup packet<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  Protocol Major: 3 Minor: 0<br>
&gt;&gt; &gt;&gt; &gt; database: postgres user: postgres<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  sending backend key data<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  send pid 15378 to frontend<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: Query:&quot;SET<br>
&gt;&gt; &gt;&gt; &gt; application_name TO &#39;createdb&#39;&quot;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  waiting for query response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  waiting for backend:0 to<br>
&gt;&gt; &gt;&gt; complete<br>
&gt;&gt; &gt;&gt; &gt; the query<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;S&#39;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;C&#39;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;Z&#39;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: Query:&quot;SET<br>
&gt;&gt; &gt;&gt; &gt; application_name TO &#39;createdb&#39;&quot;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  waiting for query response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  waiting for backend:1 to<br>
&gt;&gt; &gt;&gt; complete<br>
&gt;&gt; &gt;&gt; &gt; the query<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;S&#39;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;C&#39;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;Z&#39;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing<br>
&gt;&gt; &gt;&gt; &gt; transaction isolation. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing<br>
&gt;&gt; writing<br>
&gt;&gt; &gt;&gt; &gt; transaction. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing<br>
&gt;&gt; failed<br>
&gt;&gt; &gt;&gt; &gt; transaction. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing<br>
&gt;&gt; failed<br>
&gt;&gt; &gt;&gt; &gt; transaction. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing skip<br>
&gt;&gt; &gt;&gt; &gt; reading from backends. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing<br>
&gt;&gt; ignore<br>
&gt;&gt; &gt;&gt; &gt; till sync. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing frontend response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;Q&#39;(51) from<br>
&gt;&gt; &gt;&gt; frontend<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing<br>
&gt;&gt; doing<br>
&gt;&gt; &gt;&gt; &gt; extended query messaging. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: setting<br>
&gt;&gt; query in<br>
&gt;&gt; &gt;&gt; &gt; progress. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  decide where to send the<br>
&gt;&gt; queries<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  destination = 0 for query=<br>
&gt;&gt; &gt;&gt; &quot;CREATE<br>
&gt;&gt; &gt;&gt; &gt; DATABASE &quot;DB5&quot;;<br>
&gt;&gt; &gt;&gt; &gt;     &quot;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  waiting for query response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  waiting for backend:0 to<br>
&gt;&gt; &gt;&gt; complete<br>
&gt;&gt; &gt;&gt; &gt; the query<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: C<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: C<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: C<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: C<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet<br>
&gt;&gt; kind<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  backend:0 of 2 kind = &#39;C&#39;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;C&#39;(43) from<br>
&gt;&gt; &gt;&gt; backend<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: setting<br>
&gt;&gt; command<br>
&gt;&gt; &gt;&gt; &gt; success. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet<br>
&gt;&gt; kind<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  backend:0 of 2 kind = &#39;Z&#39;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;Z&#39;(5a) from<br>
&gt;&gt; &gt;&gt; backend<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  Ready For Query received<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading message length<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  slot: 0 length: 5<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing ReadyForQuery<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  transaction state &#39;I&#39;(49)<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing frontend response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;X&#39;(58) from<br>
&gt;&gt; &gt;&gt; frontend<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing<br>
&gt;&gt; doing<br>
&gt;&gt; &gt;&gt; &gt; extended query messaging. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: LOG:  Frontend terminated<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received message kind &#39;X&#39;<br>
&gt;&gt; from<br>
&gt;&gt; &gt;&gt; &gt; frontend<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: setting<br>
&gt;&gt; query in<br>
&gt;&gt; &gt;&gt; &gt; progress. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  decide where to send the<br>
&gt;&gt; queries<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  destination = 3 for query= &quot;<br>
&gt;&gt; &gt;&gt; &gt; DISCARD ALL&quot;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  waiting for query response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  waiting for backend:0 to<br>
&gt;&gt; &gt;&gt; complete<br>
&gt;&gt; &gt;&gt; &gt; the query<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet<br>
&gt;&gt; kind<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  parameter name: is_superuser<br>
&gt;&gt; &gt;&gt; &gt; value: &quot;on&quot;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet<br>
&gt;&gt; kind<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  parameter name:<br>
&gt;&gt; &gt;&gt; &gt; session_authorization value: &quot;postgres&quot;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet<br>
&gt;&gt; kind<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  parameter name:<br>
&gt;&gt; application_name<br>
&gt;&gt; &gt;&gt; &gt; value: &quot;createdb&quot;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet<br>
&gt;&gt; kind<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  backend:0 of 2 kind = &#39;C&#39;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;C&#39;(43) from<br>
&gt;&gt; &gt;&gt; backend<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: setting<br>
&gt;&gt; command<br>
&gt;&gt; &gt;&gt; &gt; success. DONE<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet<br>
&gt;&gt; kind<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  backend:0 of 2 kind = &#39;Z&#39;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;Z&#39;(5a) from<br>
&gt;&gt; &gt;&gt; backend<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  Ready For Query received<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading message length<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  slot: 0 length: 5<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing ReadyForQuery<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  transaction state &#39;I&#39;(49)<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  setting backend connection<br>
&gt;&gt; close<br>
&gt;&gt; &gt;&gt; &gt; timer<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  close time 1417593063<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; 2014-12-03 0:05 GMT+01:00 Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;:<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; frstly I want to say &quot;Good job, your technology is really good,<br>
&gt;&gt; thank<br>
&gt;&gt; &gt;&gt; &gt;&gt; you.&quot;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; and secondly &quot;Sorry for my bad english, I do my best.&quot;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Ok, so what&#39;s my problem:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; I created replication model for my application (1 server with<br>
&gt;&gt; pgpool2<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; instance and 2 servers like host0 and host1). Everything is ok<br>
&gt;&gt; except<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; online_recovery part which I really have problem to understand.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; For now I have 3 empty scripts so adding node works, but there is<br>
&gt;&gt; no<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; sychronization of DBs:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; basebackup<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; pgpool_recovery_pitr<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; pgpool_remote_start<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; There is a sample of basebackup script:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; #! /bin/sh<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; DATA=$1<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; RECOVERY_TARGET=$2<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; RECOVERY_DATA=$3<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; psql -c &quot;select pg_start_backup(&#39;pgpool-recovery&#39;)&quot;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; postgres echo &quot;restore_command = &#39;scp<br>
&gt;&gt; $HOSTNAME:/data/archive_log/%f<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; %p&#39;&quot; &gt; /data/recovery.conf<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; tar -C /data -zcf pgsql.tar.gz pgsql<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; psql -c &#39;select pg_stop_backup()&#39; postgres<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; scp pgsql.tar.gz $RECOVERY_TARGET:$RECOVERY_DATA<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; I really need some advices there, because can&#39;t understand it.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; 1] there is something like /data/ so its $DATA or its other data?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; 2] there is tar on pgsql in data directory, but i have no pgsql<br>
&gt;&gt; &gt;&gt; directory<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; there<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; 3] do you have some working example? not only common sample?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; 4] very similar problem I have with other two scripts<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Last 2 days I spent many hours by trying to understand this online<br>
&gt;&gt; &gt;&gt; &gt;&gt; recovery<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; mechanism, but<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; my karma is probably too low.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Thank you for any advice,<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Michal Stava,<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; CZECH REPUBLIC<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; I recommend to start with this tutorial:<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; <a href="http://www.pgpool.net/pgpool-web/contrib_docs/simple_sr_setting2_3.3/index.html" target="_blank">http://www.pgpool.net/pgpool-web/contrib_docs/simple_sr_setting2_3.3/index.html</a><br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; Best regards,<br>
&gt;&gt; &gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; Tatsuo Ishii<br>
&gt;&gt; &gt;&gt; &gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; &gt;&gt; &gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt;<br>
</div></div></blockquote></div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>