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

Tatsuo Ishii ishii at sraoss.co.jp
Wed Mar 11 13:14:42 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_6_STABLE

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

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



More information about the pgpool-committers mailing list