[pgpool-general: 9316] Re: pgpool Connection issue: ERROR: unable to read message kind
Tatsuo Ishii
ishii at postgresql.org
Tue Jan 7 09:31:35 JST 2025
> Let me explain the issue in more detail.
>
> we are using hammerDB to do the benchmarking on Postgres 15.6 High
> available setup ( 2 node setup)
> pgpool version: 4.5
>
> *Issue*: while connecting with pgpool we see error
>
>
> *Error in Virtual User 1: Error: Connection to database failedconnection to
> server at "10.35.8.6", port 9999 failed: ERROR: unable to read message
> kindDETAIL: kind does not match between main(53) slot[1] (45)*
[snip]
> We are running a hammerDB test on a postgresql cluster (build schema) from
> a different machine. Now during the initial build schema it is failing
> saying tpcc_db is not exists on standby node.
>
> We are using Asynchronous replication and off the load balancing setting on
> pgpool, like * load_balance_mode = off* and *database_redirect_preference_list
> = '.*:primary', *so based on this setting all the connections has to be
> routed only to primary node right? Then why is the connection getting
> authorized to standby node?
No. Pgpool-II's child process (that is responsible for session of each
client) unconditionaly connects to all PostgreSQL server listed in
pgpool.conf.
> We tried with *synchronous_commit = remote_apply *and we don't see any
> issues/errors.
Yes. As I aready explained, it's the only way to replicate newly
created database in real time in streaming replication.
> But we want specifically a Asynchronous setup.
>
> Is there anything we need to set in either pgpool.conf or postgresql.conf
> to use asyn replication and redirect all the connections to primary only?
No. Some parts of Pgpool need to access standby servers even when
load_balance_mode is off. For example, if a query is sent in extended
query procol message (which is used by many drivers including JDBC)
Someday we may be able to enhance the situation, but it will tak some
time.
Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
More information about the pgpool-general
mailing list