projects
/
pgpool2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6fbb58
)
Fix memory leak when memory_cache_enabled = on and write SQLs are sent.
author
Bo Peng
<pengbo@sraoss.co.jp>
Tue, 9 Oct 2018 00:22:31 +0000
(09:22 +0900)
committer
Bo Peng
<pengbo@sraoss.co.jp>
Tue, 9 Oct 2018 00:23:43 +0000
(09:23 +0900)
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
patch
|
blob
|
blame
|
history
diff --git
a/src/query_cache/pool_memqcache.c
b/src/query_cache/pool_memqcache.c
index 201eecc6722fe499a8277b71f117a6ec88c3fb6d..7ab71bebf1c6ba8da89da2500bae852083f47a90 100644
(file)
--- a/
src/query_cache/pool_memqcache.c
+++ b/
src/query_cache/pool_memqcache.c
@@
-3345,6
+3345,7
@@
void pool_handle_query_cache(POOL_CONNECTION_POOL *backend, char *query, Node *n
* if 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)