pgsql: Use one stringbuffer for all rows printed in printtup.c.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use one stringbuffer for all rows printed in printtup.c.
Date: 2017-10-11 23:35:39
Message-ID: E1e2QXL-0001d9-2X@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use one stringbuffer for all rows printed in printtup.c.

This avoids newly allocating, and then possibly growing, the
stringbuffer for every row. For wide rows this can substantially
reduce memory allocator overhead, at the price of not immediately
reducing memory usage after outputting an especially wide row.

Author: Andres Freund
Discussion: https://postgr.es/m/20170914063418.sckdzgjfrsbekae4@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f2dec34e19d3969ddd616e671fe9a7b968bec812

Modified Files
--------------
src/backend/access/common/printtup.c | 46 ++++++++++++++++++++----------------
1 file changed, 25 insertions(+), 21 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2017-10-12 00:04:55 pgsql: pg_stat_statements: Widen query IDs from 32 bits to 64 bits.
Previous Message Andres Freund 2017-10-11 23:11:15 pgsql: Allow to avoid NUL-byte management for stringinfos and use in fo