[pgpool-committers: 6613] pgpool: Fix possible data inconsistency in native replication mode.

Tatsuo Ishii ishii at sraoss.co.jp
Wed Mar 11 13:14:48 JST 2020


Fix possible data inconsistency in native replication mode.

There is a long standing bug with native replication mode. As reported
in pgpool-general, it is possible to lost sync of database if slave
DB's postgres process is killed. This is due to an oversight in
read_packets_and_process().

In replication mode if slave server's postgres is killed, then local
backend status is set to down.

*(my_backend_status[i]) = CON_DOWN;

So next DDL/DML in the same session is only issued to master node (and
other slave if there are multiple slave nodes). Of course this leads
to serious data inconsistency problem because in native replication
mode all DB nodes must receive DDL/DML at the same time.

Fix is triggering failover in thiscase.

Discussions:
https://www.pgpool.net/pipermail/pgpool-general/2020-March/006954.html
https://www.pgpool.net/pipermail/pgpool-hackers/2020-March/003540.html

Branch
------
V3_7_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=eb79d408572f133eba2c26418bd6fa6629c8f631

Modified Files
--------------
src/protocol/pool_process_query.c | 13 +++++++++++++
1 file changed, 13 insertions(+)



More information about the pgpool-committers mailing list