When INSERT command is received, pgpool automatically issues table
LOCK command to the target table but it forgot to send the command to
other than main nodes. This only happened in extended query mode.
This commit fixes the bug.
Discussion: GitHub issue #69.
https://github.com/pgpool/pgpool2/issues/69
Backpatch-through: v4.1
per_node_statement_log(backend, i, qbuf);
if (pool_get_session_context(true) && pool_is_doing_extended_query_message())
{
- do_query(MAIN(backend), qbuf, &result, MAJOR(backend));
+ do_query(CONNECTION(backend, i), qbuf, &result, MAJOR(backend));
if (result)
free_select_result(result);
}