mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Fix failing regression test on x86-32 machines
95d6e9af0
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 <myon@debian.org>
Discussion: https://postgr.es/m/Z-q3ZAM4OhE-4UiI@msg.df7cb.de
This commit is contained in:
@ -787,7 +787,7 @@ select explain_filter('explain (analyze,buffers off,costs off) select sum(n) ove
|
||||
|
||||
-- Test tuplestore storage usage in Window aggregate (disk case)
|
||||
set work_mem to 64;
|
||||
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,2000) a(n)');
|
||||
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,2500) a(n)');
|
||||
explain_filter
|
||||
----------------------------------------------------------------------------------
|
||||
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
|
||||
(6 rows)
|
||||
|
||||
-- Test tuplestore storage usage in Window aggregate (memory and disk case, final result is disk)
|
||||
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))');
|
||||
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))');
|
||||
explain_filter
|
||||
----------------------------------------------------------------------------------------
|
||||
WindowAgg (actual time=N.N..N.N rows=N.N loops=N)
|
||||
|
@ -183,7 +183,7 @@ select explain_filter('explain (analyze,buffers off,serialize) create temp table
|
||||
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,10) a(n)');
|
||||
-- Test tuplestore storage usage in Window aggregate (disk case)
|
||||
set work_mem to 64;
|
||||
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,2000) a(n)');
|
||||
select explain_filter('explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,2500) a(n)');
|
||||
-- Test tuplestore storage usage in Window aggregate (memory and disk case, final result is disk)
|
||||
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))');
|
||||
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))');
|
||||
reset work_mem;
|
||||
|
Reference in New Issue
Block a user