<div dir="ltr">Hi,<div><br></div><div>Yes we have set master_slave_mode = on and master_slave_sub_mode = 'stream'. I have attached pgpool.conf</div><div><br></div><div>Thanks</div></div><br><div class="gmail_quote"><div dir="ltr">El sáb., 22 dic. 2018 a las 12:25, Bo Peng (<<a href="mailto:pengbo@sraoss.co.jp">pengbo@sraoss.co.jp</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On Tue, 18 Dec 2018 09:20:02 +0100<br>
Jaime Soler <<a href="mailto:jaime.soler@gmail.com" target="_blank">jaime.soler@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
> <br>
> I have two server postgresql 10.X configured with streaming replication and<br>
> two pgpool server in front of pg, watchdog to control pgpool ha and vip to<br>
> access pgpool service.<br>
> I am getting this error at pgpool log:<br>
> Dec 17 03:18:01 XXXX1 pgpool12142: [20193-1] 2018-12-17 03:18:01: pid<br>
> 12142: LOG: pool_send_and_wait: Error or notice message from backend: : DB<br>
> node id: 1 backend pid: 24931 statement: "SAVEPOINT<br>
> _EXEC_SVP_0x55594d617a10" message: "la orden SAVEPOINT sólo puede ser usada<br>
> en bloques de transacción"<br>
> Dec 17 03:18:01 XXXX1 pgpool12142: [20193-2] 2018-12-17 03:18:01: pid<br>
> 12142: LOCATION: pool_proto_modules.c:3317<br>
> Dec 17 03:18:01 XXXX1 pgpool12142: [20194-1] 2018-12-17 03:18:01: pid<br>
> 12142: WARNING: packet kind of backend 1 ['E'] does not match with<br>
> master/majority nodes packet kind ['C']<br>
> Dec 17 03:18:01 XXXX1 pgpool12142: [20194-2] 2018-12-17 03:18:01: pid<br>
> 12142: LOCATION: pool_process_query.c:3635<br>
> Dec 17 03:18:01 XXXX1 pgpool12142: [20195-1] 2018-12-17 03:18:01: pid<br>
> 12142: FATAL: failed to read kind from backend<br>
> Dec 17 03:18:01 XXXX1 pgpool12142: [20195-2] 2018-12-17 03:18:01: pid<br>
> 12142: DETAIL: kind mismatch among backends. Possible last query was:<br>
> "SAVEPOINT _EXEC_SVP_0x55594d617a10" kind details are: 0[C] 1[E: la orden<br>
> SAVEPOINT sólo puede ser usada en bloques de transacción]<br>
<br>
How did you configure pgpool.conf?<br>
Did you set "master_slave_mode = on" and "master_slave_sub_mode = 'stream"?<br>
<br>
> I think that there is an application that is connecting to pgpool using<br>
> postgresql odbc driver because I have found the same savepoint name pattern<br>
> at psqlodbc repository:<br>
> <a href="https://git.postgresql.org/gitweb/?p=psqlodbc.git;a=blob;f=execute.c;hb=e0e512f5c18750e747164d9110bcf6752d013126#l399" rel="noreferrer" target="_blank">https://git.postgresql.org/gitweb/?p=psqlodbc.git;a=blob;f=execute.c;hb=e0e512f5c18750e747164d9110bcf6752d013126#l399</a><br>
> <a href="https://git.postgresql.org/gitweb/?p=psqlodbc.git;a=blob;f=execute.c;hb=e0e512f5c18750e747164d9110bcf6752d013126#l599" rel="noreferrer" target="_blank">https://git.postgresql.org/gitweb/?p=psqlodbc.git;a=blob;f=execute.c;hb=e0e512f5c18750e747164d9110bcf6752d013126#l599</a><br>
> And I suppose that the Level of rollback on errors, it was set as Statement<br>
> =2<br>
> <br>
> Config doc of odbc driver ( <a href="https://odbc.postgresql.org/docs/config.html" rel="noreferrer" target="_blank">https://odbc.postgresql.org/docs/config.html</a> )<br>
> Specifies what to rollback should an error occur.<br>
> Nop(0): Don't rollback anything and let the application handle the error.<br>
> Transaction(1): Rollback the entire transaction.<br>
> Statement(2): Rollback the statement.<br>
> Setup note: This specification is set up with the PROTOCOL option parameter.<br>
> PROTOCOL=7.4-(0|1|2)<br>
> default value is Statement (it is Transaction for servers before 8.0).<br>
> <br>
> Looking at the log, backend 1 is got an Error  ['E']  and backend 0 had a<br>
> complete command ['C'] packet kind to there was a kind mismatch among<br>
> backends. But I don't understand why pgpool was getting that error. Under<br>
> my knowledge our pgpool cluster has enabled load balancing so if a<br>
> connection start/begin a transaction pgpool routes this to master node and<br>
> routes the whole transaction to the master node and the previous error<br>
> hasn't be thrown by pgpool.  Could you help to find out why is failing ?<br>
> <br>
> Thanks<br>
<br>
<br>
-- <br>
Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>><br>
SRA OSS, Inc. Japan<br>
<br>
</blockquote></div>