<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">I found in the list archive:<br>
      <pre>&gt;<i> Are you using streaming replication? If so, it's an expected behavior
</i>&gt;<i> because it's an asynchronous replication system.</i></pre>
      I wonder what it has in common when I do not do load balancing, so
      the contents of the standby should not matter. <br>
      <br>
      It seems that with \c db pgpool creates connections to db for both
      backends - primary and standby. It uses only primary (no load
      balancing), still all fails if connection to standby cannot
      succeed. <br>
      <br>
      It makes streaming replication problematic, because it is async,
      while pgpool assumes sync. <br>
      <br>
      I wonder id setting delay_threshold or other params can solve the
      problem?<br>
      <br>
      If not, then it should be mentioned clearly in the docs that
      streaming replication is not fully supported, i.e. that it is
      expected that \c db fails when issued just after create db<br>
      <br>
      J.<br>
      <br>
      On 08.07.2015 16:19, Janusz Borkowski wrote:<br>
    </div>
    <blockquote cite="mid:559D3166.3050702@infobright.com" type="cite">
      <pre wrap="">Hi!

My configuration has 2 x pgpool with watchdog + 2 x postgres with streaming replication.
A psql client connects to this cluster through the delegate IP.

If I issue the following command manually one by one, they work:
de2505=# \c postgres
You are now connected to database "postgres" as user "postgres".
postgres=# drop database if exists de2505;
DROP DATABASE
postgres=# create database de2505 template=template0 ENCODING='utf8' LC_COLLATE='C' LC_CTYPE='C';
CREATE DATABASE
postgres=# \c de2505;
You are now connected to database "de2505" as user "postgres".
de2505=#

If I copy/paste all these statements together into psql, so the statements are executed immediately one after another, I get:

postgres=# \c postgres
You are now connected to database "postgres" as user "postgres".
postgres=# drop database if exists de2505;
DROP DATABASE
postgres=# create database de2505 template=template0 ENCODING='utf8' LC_COLLATE='C' LC_CTYPE='C';
CREATE DATABASE
postgres=# \c de2505;
ERROR:  unable to read message kind
DETAIL:  kind does not match between master(53) slot[1] (45)
Previous connection kept
postgres=#

This is fully reproducible. It looks like statements must be separated in time to work correctly. How to deal with it? My conf file is attached.
The standby PG is in recovery, but anyway I have load_balance_mode = off
pgpool-II version 3.4.2 (tataraboshi)

Thanks!
JanuszB
</pre>
    </blockquote>
    <br>
  </body>
</html>