[pgpool-general: 6015] Re: Fwd: INSERT statements sent to standby

Lazaro Garcia lazaro3487 at gmail.com
Thu Apr 5 04:28:14 JST 2018


There is a bug on 3.7.2 related with that issue. The core team is working on this. Could you try to downgrade your version with 3.7.1?

 

Regards,

 

De: pgpool-general-bounces at pgpool.net [mailto:pgpool-general-bounces at pgpool.net] En nombre de Bud Curly
Enviado el: miércoles, 4 de abril de 2018 11:00 a. m.
Para: pgpool-general at pgpool.net
Asunto: [pgpool-general: 6014] Fwd: INSERT statements sent to standby

 

Hi and thanks for your work.

I use pgpool2 3.7.2 with 2 backend as master-slave mode with native stream replication.

I think I have an issue whenever I do these steps :

1.	Node 0 is master, node 1 is slave. Everything goes well.
2.	I shut node 0, which causes failover and promote node 1 to the new master. Everything goes well, I still can insert datas here.
3.	I do an online recovery of the node 0. So it goes as standby then. Since here, pgpool send all INSERT statement on the backend 0.

Here is pgpool log which demonstrate well the weird behaviour :

root at srv:~# pgpool -n
2018-04-04 14:26:01: pid 28055:LOG:  Setting up socket for 0.0.0.0:21042 <http://0.0.0.0:21042> 
2018-04-04 14:26:01: pid 28055:LOG:  Setting up socket for :::21042
2018-04-04 14:26:01: pid 28055:LOG:  find_primary_node_repeatedly: waiting for finding a primary node
2018-04-04 14:26:01: pid 28055:LOG:  find_primary_node: checking backend no 0
2018-04-04 14:26:01: pid 28055:LOG:  find_primary_node: checking backend no 1
2018-04-04 14:26:01: pid 28055:LOG:  find_primary_node: primary node id is 1
2018-04-04 14:26:01: pid 28055:LOG:  pgpool-II successfully started. version 3.7.2 (amefuriboshi)
2018-04-04 14:26:10: pid 28075:LOG:  pool_send_and_wait: Error or notice message from backend: : DB node id: 0 backend pid: 28098 statement: "insert into "***[...]***" message: "cannot execute INSERT in a read-only transaction"

The primary node is node 1, however it send INSERT on the standby. If I shut node 0, INSERT are sent to node 1 just well. If I restart node 0, the problem shows up again.

With select pg_is_in_recovery(); and pcp_node_info I can see that node 1 is the master and node 0 is the standby.

I can manually INSERT on Node 1 directly. On Node 0, I have the same error as expected : cannot execute INSERT in a read-only transaction

With log_error_verbosity = verbose I have no revelant information.

Here is my pgpool.conf :

 <https://github.com/pgpool/pgpool2/files/1875707/pgpool.conf.txt> pgpool.conf

 

 

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


More information about the pgpool-general mailing list