[pgpool-general: 6351] kind mismatch among backends, savepoint with psqlodbc

Jaime Soler jaime.soler at gmail.com
Tue Dec 18 17:20:02 JST 2018


Hi,

I have two server postgresql 10.X configured with streaming replication and
two pgpool server in front of pg, watchdog to control pgpool ha and vip to
access pgpool service.
I am getting this error at pgpool log:
Dec 17 03:18:01 XXXX1 pgpool12142: [20193-1] 2018-12-17 03:18:01: pid
12142: LOG: pool_send_and_wait: Error or notice message from backend: : DB
node id: 1 backend pid: 24931 statement: "SAVEPOINT
_EXEC_SVP_0x55594d617a10" message: "la orden SAVEPOINT sólo puede ser usada
en bloques de transacción"
Dec 17 03:18:01 XXXX1 pgpool12142: [20193-2] 2018-12-17 03:18:01: pid
12142: LOCATION: pool_proto_modules.c:3317
Dec 17 03:18:01 XXXX1 pgpool12142: [20194-1] 2018-12-17 03:18:01: pid
12142: WARNING: packet kind of backend 1 ['E'] does not match with
master/majority nodes packet kind ['C']
Dec 17 03:18:01 XXXX1 pgpool12142: [20194-2] 2018-12-17 03:18:01: pid
12142: LOCATION: pool_process_query.c:3635
Dec 17 03:18:01 XXXX1 pgpool12142: [20195-1] 2018-12-17 03:18:01: pid
12142: FATAL: failed to read kind from backend
Dec 17 03:18:01 XXXX1 pgpool12142: [20195-2] 2018-12-17 03:18:01: pid
12142: DETAIL: kind mismatch among backends. Possible last query was:
"SAVEPOINT _EXEC_SVP_0x55594d617a10" kind details are: 0[C] 1[E: la orden
SAVEPOINT sólo puede ser usada en bloques de transacción]

I think that there is an application that is connecting to pgpool using
postgresql odbc driver because I have found the same savepoint name pattern
at psqlodbc repository:
https://git.postgresql.org/gitweb/?p=psqlodbc.git;a=blob;f=execute.c;hb=e0e512f5c18750e747164d9110bcf6752d013126#l399
https://git.postgresql.org/gitweb/?p=psqlodbc.git;a=blob;f=execute.c;hb=e0e512f5c18750e747164d9110bcf6752d013126#l599
And I suppose that the Level of rollback on errors, it was set as Statement
=2

Config doc of odbc driver ( https://odbc.postgresql.org/docs/config.html )
Specifies what to rollback should an error occur.
Nop(0): Don't rollback anything and let the application handle the error.
Transaction(1): Rollback the entire transaction.
Statement(2): Rollback the statement.
Setup note: This specification is set up with the PROTOCOL option parameter.
PROTOCOL=7.4-(0|1|2)
default value is Statement (it is Transaction for servers before 8.0).

Looking at the log, backend 1 is got an Error  ['E']  and backend 0 had a
complete command ['C'] packet kind to there was a kind mismatch among
backends. But I don't understand why pgpool was getting that error. Under
my knowledge our pgpool cluster has enabled load balancing so if a
connection start/begin a transaction pgpool routes this to master node and
routes the whole transaction to the master node and the previous error
hasn't be thrown by pgpool.  Could you help to find out why is failing ?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20181218/67804d83/attachment.html>


More information about the pgpool-general mailing list