Fix another bug in native replication/snapshot isolation mode.
authorTatsuo Ishii <ishii@postgresql.org>
Sat, 14 Sep 2024 12:07:33 +0000 (21:07 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Sat, 14 Sep 2024 12:15:44 +0000 (21:15 +0900)
insert_lock() forgot to send row lock command (lock_kind == 3 case) to
other than main node.

src/protocol/pool_process_query.c

index 2aab2b29d64fa678cb390324bd6627a7c8fce8ad..cdeaa0328f09a690fa63b0735e0c5acf766d01c8 100644 (file)
@@ -2845,7 +2845,7 @@ insert_lock(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backend, char *qu
                                                                                        MAIN_CONNECTION(backend)->pid, MAIN_CONNECTION(backend)->key, 0);
                                        }
                                }
-                               else if (lock_kind == 2)
+                               else if (lock_kind == 2 || lock_kind == 3)
                                {
                                        per_node_statement_log(backend, i, qbuf);
                                        do_query(CONNECTION(backend, i), qbuf, &result, MAJOR(backend));