[pgpool-general: 3863] Re: message kind error

Janusz Borkowski janusz.borkowski at infobright.com
Thu Jul 9 00:30:35 JST 2015


I found in the list archive:

>/ Are you using streaming replication? If so, it's an expected behavior
/>/ because it's an asynchronous replication system./

I wonder what it has in common when I do not do load balancing, so the contents of the standby should not matter.

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.

It makes streaming replication problematic, because it is async, while pgpool assumes sync.

I wonder id setting delay_threshold or other params can solve the problem?

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

J.

On 08.07.2015 16:19, Janusz Borkowski wrote:
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20150708/afbae6a2/attachment.html>


More information about the pgpool-general mailing list