Detach only synchronized server (#338)

Currently client can issue two consequtive sync requests and we will detach
his server connection right after first ReadyForQuery. This seems incorrect.
This commit is contained in:
Andrey Borodin 2021-06-03 10:40:45 +05:00 committed by GitHub
parent bf48de6242
commit 25b7e36870
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -743,7 +743,7 @@ static od_frontend_status_t od_frontend_remote_server(od_relay_t *relay,
return OD_SKIP;
/* handle transaction pooling */
if (is_ready_for_query) {
if (is_ready_for_query && od_server_synchronized(server)) {
if ((route->rule->pool == OD_RULE_POOL_TRANSACTION ||
server->offline) &&
!server->is_transaction && !route->id.physical_rep &&