[pgpool-general: 3865] Re: message kind error
Tatsuo Ishii
ishii at postgresql.org
Thu Jul 9 08:17:07 JST 2015
Please do a top post if you want to start a new topic thread.
You send a follow up post to someone else's message.
> 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)
This due to delay of streaming replication. You can insert something
like "select sleep(10)" between create database and \c.
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
More information about the pgpool-general
mailing list