From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Add regression test case exercising the sorting path for hash in |
Date: | 2016-07-16 19:30:23 |
Message-ID: | E1bOVI7-0000is-5p@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add regression test case exercising the sorting path for hash index build.
We've broken this code path at least twice in the past, so it's prudent
to have a test case that covers it. To allow exercising the code path
without creating a very large (and slow to run) test case, redefine the
sort threshold to be bounded by maintenance_work_mem as well as the number
of available buffers. While at it, fix an ancient oversight that when
building a temp index, the number of available buffers is not NBuffers but
NLocBuffer. Also, if assertions are enabled, apply a direct test that the
sort actually does return the tuples in the expected order.
Peter Geoghegan
Patch: <CAM3SWZTBAo4hjbBd780+MrOKiKp_TMo1N3A0Rw9_im8gbD7fQA(at)mail(dot)gmail(dot)com>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/9563d5b5e4c75e676d73a45546bd47b77c2bd739
Modified Files
--------------
src/backend/access/hash/hash.c | 20 +++++++++++++++++---
src/backend/access/hash/hashsort.c | 23 ++++++++++++++++++++---
src/test/regress/expected/create_index.out | 7 +++++++
src/test/regress/sql/create_index.sql | 7 +++++++
4 files changed, 51 insertions(+), 6 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-07-16 20:25:48 | pgsql: Improve test case exercising the sorting path for hash index bui |
Previous Message | Tom Lane | 2016-07-16 18:43:07 | pgsql: Fix crash in close_ps() for NaN input coordinates. |