Reduce the number of pallocs() in BRIN
Alvaro Herrera <alvherre@alvh.no-ip.org>
Reduce the number of pallocs() in BRIN Instead of allocating memory in brin_deform_tuple and brin_copy_tuple over and over during a scan, allow reuse of previously allocated memory. This is said to make for a measurable performance improvement. Author: Jinyu Zhang, Álvaro Herrera Reviewed by: Tomas Vondra Discussion: https://postgr.es/m/495deb78.4186.1500dacaa63.Coremail.beijing_pg@163.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pageinspect/brinfuncs.c | modified | +2 −1 |
| src/backend/access/brin/brin.c | modified | +15 −9 |
| src/backend/access/brin/brin_pageops.c | modified | +3 −1 |
| src/backend/access/brin/brin_tuple.c | modified | +49 −28 |
| src/include/access/brin_tuple.h | modified | +9 −3 |
Discussion
- Patch: Optimize memory allocation in function 'bringetbitmap' 14 messages · 2015-09-27 → 2017-04-07