Skip to content

Commit 3dbdf86

Browse files
committed
Fix failing regression test on x86-32 machines
95d6e9a added code to display the tuplestore storage type for WindowAgg nodes and added a test to ensure the "Disk" storage method was working correctly by setting work_mem to 64 and running a test which caused the WindowAgg to go to disk. Seemingly, the number of rows chosen there wasn't quite enough for that to happen in x86 32-bit. Fix this by increasing the number of rows slightly. I suspect the buildfarm didn't catch this as MEMORY_CONTEXT_CHECKING builds will use a bit more memory for MemoryChunks to store the requested_size and also because of the additional space to store the chunk's sentinel byte. Reported-by: Christoph Berg <[email protected]> Discussion: https://postgr.es/m/[email protected]
1 parent 2fd3e2f commit 3dbdf86

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/test/regress/expected/explain.out

+2-2
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ select explain_filter('explain (analyze,buffers off,costs off) select sum(n) ove
787787

788788
-- Test tuplestore storage usage in Window aggregate (disk case)
789789
set work_mem to 64;
790-
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,2000) a(n)');
790+
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,2500) a(n)');
791791
explain_filter
792792
----------------------------------------------------------------------------------
793793
WindowAgg (actual time=N.N..N.N rows=N.N loops=N)
@@ -799,7 +799,7 @@ select explain_filter('explain (analyze,buffers off,costs off) select sum(n) ove
799799
(6 rows)
800800

801801
-- Test tuplestore storage usage in Window aggregate (memory and disk case, final result is disk)
802-
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over(partition by m) from (SELECT n < 3 as m, n from generate_series(1,2000) a(n))');
802+
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over(partition by m) from (SELECT n < 3 as m, n from generate_series(1,2500) a(n))');
803803
explain_filter
804804
----------------------------------------------------------------------------------------
805805
WindowAgg (actual time=N.N..N.N rows=N.N loops=N)

src/test/regress/sql/explain.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ select explain_filter('explain (analyze,buffers off,serialize) create temp table
183183
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,10) a(n)');
184184
-- Test tuplestore storage usage in Window aggregate (disk case)
185185
set work_mem to 64;
186-
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,2000) a(n)');
186+
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,2500) a(n)');
187187
-- Test tuplestore storage usage in Window aggregate (memory and disk case, final result is disk)
188-
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over(partition by m) from (SELECT n < 3 as m, n from generate_series(1,2000) a(n))');
188+
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over(partition by m) from (SELECT n < 3 as m, n from generate_series(1,2500) a(n))');
189189
reset work_mem;

0 commit comments

Comments
 (0)