summaryrefslogtreecommitdiff
path: root/src/test/modules/injection_points/expected/hashagg.out
blob: cc4247af97d085c02a2b56fe2e33852dde807ddb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
-- Test for hash aggregation
CREATE EXTENSION injection_points;
SELECT injection_points_set_local();
 injection_points_set_local 
----------------------------
 
(1 row)

SELECT injection_points_attach('hash-aggregate-enter-spill-mode', 'notice');
 injection_points_attach 
-------------------------
 
(1 row)

SELECT injection_points_attach('hash-aggregate-process-batch', 'notice');
 injection_points_attach 
-------------------------
 
(1 row)

-- force partition fan-out to 1
SELECT injection_points_attach('hash-aggregate-single-partition', 'notice');
 injection_points_attach 
-------------------------
 
(1 row)

-- force spilling after 1000 groups
SELECT injection_points_attach('hash-aggregate-spill-1000', 'notice');
 injection_points_attach 
-------------------------
 
(1 row)

CREATE TABLE hashagg_ij(x INTEGER);
INSERT INTO hashagg_ij SELECT g FROM generate_series(1,5100) g;
SET max_parallel_workers=0;
SET max_parallel_workers_per_gather=0;
SET enable_sort=FALSE;
SET work_mem='4MB';
SELECT COUNT(*) FROM (SELECT DISTINCT x FROM hashagg_ij) s;
NOTICE:  notice triggered for injection point hash-aggregate-spill-1000
NOTICE:  notice triggered for injection point hash-aggregate-enter-spill-mode
NOTICE:  notice triggered for injection point hash-aggregate-single-partition
NOTICE:  notice triggered for injection point hash-aggregate-process-batch
NOTICE:  notice triggered for injection point hash-aggregate-spill-1000
NOTICE:  notice triggered for injection point hash-aggregate-enter-spill-mode
NOTICE:  notice triggered for injection point hash-aggregate-single-partition
NOTICE:  notice triggered for injection point hash-aggregate-process-batch
NOTICE:  notice triggered for injection point hash-aggregate-spill-1000
NOTICE:  notice triggered for injection point hash-aggregate-enter-spill-mode
NOTICE:  notice triggered for injection point hash-aggregate-single-partition
NOTICE:  notice triggered for injection point hash-aggregate-process-batch
NOTICE:  notice triggered for injection point hash-aggregate-spill-1000
NOTICE:  notice triggered for injection point hash-aggregate-enter-spill-mode
NOTICE:  notice triggered for injection point hash-aggregate-single-partition
NOTICE:  notice triggered for injection point hash-aggregate-process-batch
NOTICE:  notice triggered for injection point hash-aggregate-spill-1000
NOTICE:  notice triggered for injection point hash-aggregate-enter-spill-mode
NOTICE:  notice triggered for injection point hash-aggregate-single-partition
NOTICE:  notice triggered for injection point hash-aggregate-process-batch
 count 
-------
  5100
(1 row)

DROP TABLE hashagg_ij;
DROP EXTENSION injection_points;