pgpool2.git / summary / log / commit / refs
commit 6f2b4b1df869829635d4a45f47a734c11fded00e
Author: Bo Peng <pengbo@sraoss.co.jp>
Date: Tue Oct 09 00:20:39 2018 +0000
Fix memory leak when memory_cache_enabled = on and write SQLs are sent.
In a explicit transaction, we the SELECT results are cached in temporary buffer.
If a write SQL is sent which modifies the table, the temporary buffe should be reset.
src/query_cache/pool_memqcache.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/query_cache/pool_memqcache.c b/src/query_cache/pool_memqcache.c
index 6c5a2cf23..92fb921cf 100644
--- a/src/query_cache/pool_memqcache.c
+++ b/src/query_cache/pool_memqcache.c
@@ -3460,6 +3460,7 @@ pool_handle_query_cache(POOL_CONNECTION_POOL * backend, char *query, Node *node,
* DML/DDL modifies the TABLE which SELECT uses.
*/
pool_check_and_discard_cache_buffer(num_oids, oids);
+ pool_reset_memqcache_buffer();
}
}
else if (num_oids == 0)
[parent: e18177f884ce]