<div dir="ltr">%/home/postgres/config# psql -p 9999 -U postgres -h localhost<br>psql (9.3.5)<br>Type &quot;help&quot; for help.<br><br>postgres=# show pool_nodes;<br> node_id |  hostname  | port | status | lb_weight |  role   <br>---------+------------+------+--------+-----------+---------<br> 0       | 10.18.1.13 | 5444 | 2      | 0.500000  | primary<br> 1       | 10.18.1.14 | 5444 | 2      | 0.500000  | standby<br>(2 rows)<br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-03 12:11 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What does &quot;show pool_nodes&quot; show?<br>
<div class="HOEnZb"><div class="h5"><br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
<br>
&gt; Hi Tatsuo,<br>
&gt;<br>
&gt; this tutorial i tried before using replication mode. But there is one<br>
&gt; problem i can&#39;t figure.<br>
&gt;<br>
&gt; I have master and slave server but only master is accepting my queries. If<br>
&gt; i try to create new db by:<br>
&gt; createdb -p 9999 -U postgres -h localhost DB5<br>
&gt; on pgpool-II server, i get info below from log but only master create this<br>
&gt; DB5. If i try to connect by pgpool-II to this new db, i get another info<br>
&gt; below.<br>
&gt;<br>
&gt; Is there anything i am doing wrong?<br>
&gt;<br>
&gt; PS:<br>
&gt; both are hot_standby and use configuration from manual, only pg_hba.conf is<br>
&gt; set to specific hosts for trust reading all databases from postgres and<br>
&gt; also trust replication<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Michal Stava<br>
&gt;<br>
&gt; LOG when connecting new DB:<br>
&gt; 2014-12-03 08:55:28: pid 21237: LOG:  pool_read_kind: error message from<br>
&gt; 1 th backend:database &quot;DB5&quot; does not exist<br>
&gt; 2014-12-03 08:55:28: pid 21237: ERROR:  unable to read message kind<br>
&gt; 2014-12-03 08:55:28: pid 21237: DETAIL:  kind does not match between<br>
&gt; master(53) slot[1] (45)<br>
&gt;<br>
&gt; LOG when creating new DB:<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  I am 21153 accept fd 11<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading startup packet<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  Protocol Major: 1234 Minor: 5679<br>
&gt; database:  user:<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  selecting backend connection<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  SSLRequest from client<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  SSL is requested but SSL support is<br>
&gt; not available<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading startup packet<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  application_name: createdb<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading startup packet<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  Protocol Major: 3 Minor: 0<br>
&gt; database: postgres user: postgres<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  sending backend key data<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  send pid 15378 to frontend<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: Query:&quot;SET<br>
&gt; application_name TO &#39;createdb&#39;&quot;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  waiting for query response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  waiting for backend:0 to complete<br>
&gt; the query<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;S&#39;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;C&#39;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;Z&#39;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: Query:&quot;SET<br>
&gt; application_name TO &#39;createdb&#39;&quot;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  waiting for query response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  waiting for backend:1 to complete<br>
&gt; the query<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;S&#39;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;C&#39;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  do_command: kind: &#39;Z&#39;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing<br>
&gt; transaction isolation. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing writing<br>
&gt; transaction. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing failed<br>
&gt; transaction. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing failed<br>
&gt; transaction. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing skip<br>
&gt; reading from backends. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing ignore<br>
&gt; till sync. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing frontend response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;Q&#39;(51) from frontend<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing doing<br>
&gt; extended query messaging. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: setting query in<br>
&gt; progress. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  decide where to send the queries<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  destination = 0 for query= &quot;CREATE<br>
&gt; DATABASE &quot;DB5&quot;;<br>
&gt;     &quot;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  waiting for query response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  waiting for backend:0 to complete<br>
&gt; the query<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: C<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: C<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: C<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: C<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet kind<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  backend:0 of 2 kind = &#39;C&#39;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;C&#39;(43) from backend<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: setting command<br>
&gt; success. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet kind<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  backend:0 of 2 kind = &#39;Z&#39;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;Z&#39;(5a) from backend<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  Ready For Query received<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading message length<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  slot: 0 length: 5<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing ReadyForQuery<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  transaction state &#39;I&#39;(49)<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing frontend response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;X&#39;(58) from frontend<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: clearing doing<br>
&gt; extended query messaging. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: LOG:  Frontend terminated<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received message kind &#39;X&#39; from<br>
&gt; frontend<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: setting query in<br>
&gt; progress. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  decide where to send the queries<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  destination = 3 for query= &quot;<br>
&gt; DISCARD ALL&quot;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  waiting for query response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  waiting for backend:0 to complete<br>
&gt; the query<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  detect error: kind: S<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet kind<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  parameter name: is_superuser<br>
&gt; value: &quot;on&quot;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet kind<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  parameter name:<br>
&gt; session_authorization value: &quot;postgres&quot;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet kind<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  parameter name: application_name<br>
&gt; value: &quot;createdb&quot;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet kind<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  backend:0 of 2 kind = &#39;C&#39;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;C&#39;(43) from backend<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  session context: setting command<br>
&gt; success. DONE<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading backend data packet kind<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  backend:0 of 2 kind = &#39;Z&#39;<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  received kind &#39;Z&#39;(5a) from backend<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing backend response<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  Ready For Query received<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  reading message length<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  slot: 0 length: 5<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  processing ReadyForQuery<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  transaction state &#39;I&#39;(49)<br>
&gt; 2014-12-03 08:51:03: pid 21153: DEBUG:  setting backend connection close<br>
&gt; timer<br>
&gt; 2014-12-03 08:51:03: pid 21153: DETAIL:  close time 1417593063<br>
&gt;<br>
&gt; 2014-12-03 0:05 GMT+01:00 Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt;:<br>
&gt;<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; frstly I want to say &quot;Good job, your technology is really good, thank<br>
&gt;&gt; you.&quot;<br>
&gt;&gt; &gt; and secondly &quot;Sorry for my bad english, I do my best.&quot;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Ok, so what&#39;s my problem:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I created replication model for my application (1 server with pgpool2<br>
&gt;&gt; &gt; instance and 2 servers like host0 and host1). Everything is ok except<br>
&gt;&gt; &gt; online_recovery part which I really have problem to understand.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; For now I have 3 empty scripts so adding node works, but there is no<br>
&gt;&gt; &gt; sychronization of DBs:<br>
&gt;&gt; &gt; basebackup<br>
&gt;&gt; &gt; pgpool_recovery_pitr<br>
&gt;&gt; &gt; pgpool_remote_start<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; There is a sample of basebackup script:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; #! /bin/sh<br>
&gt;&gt; &gt; DATA=$1<br>
&gt;&gt; &gt; RECOVERY_TARGET=$2<br>
&gt;&gt; &gt; RECOVERY_DATA=$3<br>
&gt;&gt; &gt; psql -c &quot;select pg_start_backup(&#39;pgpool-recovery&#39;)&quot;<br>
&gt;&gt; &gt; postgres echo &quot;restore_command = &#39;scp $HOSTNAME:/data/archive_log/%f<br>
&gt;&gt; &gt; %p&#39;&quot; &gt; /data/recovery.conf<br>
&gt;&gt; &gt; tar -C /data -zcf pgsql.tar.gz pgsql<br>
&gt;&gt; &gt; psql -c &#39;select pg_stop_backup()&#39; postgres<br>
&gt;&gt; &gt; scp pgsql.tar.gz $RECOVERY_TARGET:$RECOVERY_DATA<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I really need some advices there, because can&#39;t understand it.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 1] there is something like /data/ so its $DATA or its other data?<br>
&gt;&gt; &gt; 2] there is tar on pgsql in data directory, but i have no pgsql directory<br>
&gt;&gt; &gt; there<br>
&gt;&gt; &gt; 3] do you have some working example? not only common sample?<br>
&gt;&gt; &gt; 4] very similar problem I have with other two scripts<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Last 2 days I spent many hours by trying to understand this online<br>
&gt;&gt; recovery<br>
&gt;&gt; &gt; mechanism, but<br>
&gt;&gt; &gt; my karma is probably too low.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thank you for any advice,<br>
&gt;&gt; &gt; Michal Stava,<br>
&gt;&gt; &gt; CZECH REPUBLIC<br>
&gt;&gt;<br>
&gt;&gt; I recommend to start with this tutorial:<br>
&gt;&gt;<br>
&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;<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>
</div></div></blockquote></div><br></div>