View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000355 | Pgpool-II | Bug | public | 2017-10-17 19:42 | 2017-10-18 21:02 |
| Reporter | vouillon | Assigned To | t-ishii | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | open | ||
| Product Version | 3.6.3 | ||||
| Fixed in Version | 3.6.6 | ||||
| Summary | 0000355: SELECT queries are not load balanced after a commit (when using extended queries) | ||||
| Description | As far as we can see, SELECT queries performed using an extended query outside an explicit transaction are not load balanced after a commit also performed using an extended query. | ||||
| Additional Information | When performing a commit using an extended query message, the writing transaction is initially set when receiving the Execute command from the front-end (in frontend,./protocol/pool_proto_modules.c): if (!is_select_query(node, query) && !is_start_transaction_query (node)) { [...] pool_set_writing_transaction(); } } The query in progress flag is then cleared when receiving the CommandComplete message from the back-end: case 'C': /* CommandComplete */ status = CommandComplete(frontend, backend, true); pool_set_command_success(); if (pool_is_doing_extended_query_message()) pool_unset_query_in_progress(); break; When receiving the ReadyForQuery message from the back-end, the writing transaction flag is therefore not cleared: if (pool_is_query_in_progress()) { [...] else if (is_commit_or_rollback_query(node)) { pool_unset_writing_transaction(); pool_unset_failed_transaction(); pool_unset_transaction_isolation(); } Finally, since the writing transaction flag remains set, queries are thereafter directed to the master back-end when processing the Bind message from the server: if (pool_config->load_balance_mode && pool_is_writing_transaction()) { [...] if (parse_before_bind(frontend, backend, parse_msg, bind_msg) != POOL_CONTINUE) return POOL_END; } I join a log showing that the writing transaction is set ("DEBUG: session context: setting writing transaction. DONE") but not cleared, and that function parse_before_bind is then called ("DEBUG: parse before bind"). | ||||
| Tags | No tags attached. | ||||
|
|
|
|
|
This was fixed in 3.6.6. Please try the version. |
|
|
Indeed, this is fixed in 3.6.6. Great! |
|
|
Thanks for confirmation! I am going to close this issue. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2017-10-17 19:42 | vouillon | New Issue | |
| 2017-10-17 19:42 | vouillon | File Added: log2 | |
| 2017-10-17 20:33 | t-ishii | Note Added: 0001760 | |
| 2017-10-18 10:46 | t-ishii | Assigned To | => t-ishii |
| 2017-10-18 10:46 | t-ishii | Status | new => feedback |
| 2017-10-18 20:57 | vouillon | Note Added: 0001765 | |
| 2017-10-18 20:57 | vouillon | Status | feedback => assigned |
| 2017-10-18 21:01 | t-ishii | Note Added: 0001766 | |
| 2017-10-18 21:02 | t-ishii | Status | assigned => closed |
| 2017-10-18 21:02 | t-ishii | Fixed in Version | => 3.6.6 |