pgsql: Introduce LogicalTapeSetExtend().

From: Jeff Davis <jdavis(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Introduce LogicalTapeSetExtend().
Date: 2020-03-09 18:12:08
Message-ID: E1jBMsq-0000ma-Kk@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Introduce LogicalTapeSetExtend().

Increases the number of tapes in a logical tape set. This will be
important for disk-based hash aggregation, because the maximum number
of tapes is not known ahead of time.

While discussing this change, it was observed to regress the
performance of Sort for at least one test case. The performance
regression was because some versions of GCC switch to an inlined
version of memcpy() in LogicalTapeWrite() after this change. No
performance regression for clang was observed.

Because the regression is due to an arbitrary decision by the
compiler, I decided it shouldn't hold up this change. If it needs to
be fixed, we can find a workaround.

Author: Adam Lee, Jeff Davis
Discussion: https://postgr.es/m/e54bfec11c59689890f277722aaaabd05f78e22c.camel%40j-davis.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/24d85952a57b16090ca8ad9cf800fbdd9ddd104f

Modified Files
--------------
src/backend/utils/sort/logtape.c | 73 +++++++++++++++++++++++++---------------
src/include/utils/logtape.h | 1 +
2 files changed, 47 insertions(+), 27 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-03-09 18:58:39 pgsql: Fix pg_dump/pg_restore to restore event triggers later.
Previous Message Peter Geoghegan 2020-03-09 17:05:25 Re: pgsql: pageinspect: Fix types used for bt_metap() columns.