pgsql: Reduce the number of pallocs() in BRIN

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Reduce the number of pallocs() in BRIN
Date: 2017-04-07 22:09:12
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

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



Modified Files
contrib/pageinspect/brinfuncs.c | 3 +-
src/backend/access/brin/brin.c | 24 +++++++----
src/backend/access/brin/brin_pageops.c | 4 +-
src/backend/access/brin/brin_tuple.c | 77 +++++++++++++++++++++-------------
src/include/access/brin_tuple.h | 12 ++++--
5 files changed, 78 insertions(+), 42 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2017-04-07 22:27:43 pgsql: Fix printf format to use %zd when printing sizes
Previous Message Andres Freund 2017-04-07 21:50:58 pgsql: Improve 64bit atomics support.