forked from timescale/timescaledb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcagg_concurrent_refresh.out
More file actions
567 lines (454 loc) · 16.8 KB
/
Copy pathcagg_concurrent_refresh.out
File metadata and controls
567 lines (454 loc) · 16.8 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
unused step name: K1_cancelpid
unused step name: R13_refresh1
unused step name: R13_refresh2
unused step name: R13_refresh3
unused step name: R13_refresh4
unused step name: R13_refresh5
unused step name: R1_drop
unused step name: R1_refresh2
unused step name: R2_refresh
unused step name: R2_refresh_exact
unused step name: R2_refresh_superset
unused step name: R5_refresh
unused step name: R6_pending_materialization_ranges
unused step name: R6_pending_materialization_ranges_orphan
Parsed test spec with 15 sessions
starting permutation: R1_refresh S1_select R3_refresh S1_select
step R1_refresh:
CALL refresh_continuous_aggregate('cond_10', 25, 70);
step S1_select:
SELECT bucket, avg_temp
FROM cond_10
ORDER BY 1;
SELECT * FROM cagg_bucket_count('cond_10');
SELECT h.table_name AS hypertable, it.watermark AS threshold
FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold it,
_timescaledb_catalog.hypertable h
WHERE it.hypertable_id = h.id
ORDER BY 1;
bucket| avg_temp
------+----------------
0|15.8888888888889
10| 14.2
20| 13.4
30| 18.3
40|16.0909090909091
50| 26.9
60| 18.9
cagg_bucket_count
-----------------
7
hypertable | threshold
-----------+-----------
conditions | 70
conditions2|-2147483648
step R3_refresh:
CALL refresh_continuous_aggregate('cond_10', 70, 107);
step S1_select:
SELECT bucket, avg_temp
FROM cond_10
ORDER BY 1;
SELECT * FROM cagg_bucket_count('cond_10');
SELECT h.table_name AS hypertable, it.watermark AS threshold
FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold it,
_timescaledb_catalog.hypertable h
WHERE it.hypertable_id = h.id
ORDER BY 1;
bucket| avg_temp
------+----------------
0|15.8888888888889
10| 14.2
20| 13.4
30| 18.3
40|16.0909090909091
50| 26.9
60| 18.9
70| 24.6
80| 23.6
90| 21.3
cagg_bucket_count
-----------------
10
hypertable | threshold
-----------+-----------
conditions | 100
conditions2|-2147483648
starting permutation: L2_read_lock_threshold_table R3_refresh L2_read_unlock_threshold_table S1_select
R5: LOG: statement:
SET SESSION lock_timeout = '500ms';
SET SESSION deadlock_timeout = '500ms';
SET SESSION client_min_messages = 'DEBUG1';
step L2_read_lock_threshold_table:
BEGIN;
LOCK _timescaledb_catalog.continuous_aggs_invalidation_threshold
IN ACCESS SHARE MODE;
step R3_refresh:
CALL refresh_continuous_aggregate('cond_10', 70, 107);
step L2_read_unlock_threshold_table:
ROLLBACK;
step S1_select:
SELECT bucket, avg_temp
FROM cond_10
ORDER BY 1;
SELECT * FROM cagg_bucket_count('cond_10');
SELECT h.table_name AS hypertable, it.watermark AS threshold
FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold it,
_timescaledb_catalog.hypertable h
WHERE it.hypertable_id = h.id
ORDER BY 1;
bucket| avg_temp
------+----------------
0|15.8888888888889
10| 14.2
20| 13.4
70| 24.6
80| 23.6
90| 21.3
cagg_bucket_count
-----------------
6
hypertable | threshold
-----------+-----------
conditions | 100
conditions2|-2147483648
starting permutation: R1_refresh L2_read_lock_threshold_table R3_refresh L2_read_unlock_threshold_table S1_select
R5: LOG: statement:
SET SESSION lock_timeout = '500ms';
SET SESSION deadlock_timeout = '500ms';
SET SESSION client_min_messages = 'DEBUG1';
step R1_refresh:
CALL refresh_continuous_aggregate('cond_10', 25, 70);
step L2_read_lock_threshold_table:
BEGIN;
LOCK _timescaledb_catalog.continuous_aggs_invalidation_threshold
IN ACCESS SHARE MODE;
step R3_refresh:
CALL refresh_continuous_aggregate('cond_10', 70, 107);
step L2_read_unlock_threshold_table:
ROLLBACK;
step S1_select:
SELECT bucket, avg_temp
FROM cond_10
ORDER BY 1;
SELECT * FROM cagg_bucket_count('cond_10');
SELECT h.table_name AS hypertable, it.watermark AS threshold
FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold it,
_timescaledb_catalog.hypertable h
WHERE it.hypertable_id = h.id
ORDER BY 1;
bucket| avg_temp
------+----------------
0|15.8888888888889
10| 14.2
20| 13.4
30| 18.3
40|16.0909090909091
50| 26.9
60| 18.9
70| 24.6
80| 23.6
90| 21.3
cagg_bucket_count
-----------------
10
hypertable | threshold
-----------+-----------
conditions | 100
conditions2|-2147483648
starting permutation: R3_refresh L2_read_lock_threshold_table R1_refresh L2_read_unlock_threshold_table S1_select
R5: LOG: statement:
SET SESSION lock_timeout = '500ms';
SET SESSION deadlock_timeout = '500ms';
SET SESSION client_min_messages = 'DEBUG1';
step R3_refresh:
CALL refresh_continuous_aggregate('cond_10', 70, 107);
step L2_read_lock_threshold_table:
BEGIN;
LOCK _timescaledb_catalog.continuous_aggs_invalidation_threshold
IN ACCESS SHARE MODE;
step R1_refresh:
CALL refresh_continuous_aggregate('cond_10', 25, 70);
step L2_read_unlock_threshold_table:
ROLLBACK;
step S1_select:
SELECT bucket, avg_temp
FROM cond_10
ORDER BY 1;
SELECT * FROM cagg_bucket_count('cond_10');
SELECT h.table_name AS hypertable, it.watermark AS threshold
FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold it,
_timescaledb_catalog.hypertable h
WHERE it.hypertable_id = h.id
ORDER BY 1;
bucket| avg_temp
------+----------------
0|15.8888888888889
10| 14.2
20| 13.4
30| 18.3
40|16.0909090909091
50| 26.9
60| 18.9
70| 24.6
80| 23.6
90| 21.3
cagg_bucket_count
-----------------
10
hypertable | threshold
-----------+-----------
conditions | 100
conditions2|-2147483648
starting permutation: R1_refresh R12_refresh
R5: LOG: statement:
SET SESSION lock_timeout = '500ms';
SET SESSION deadlock_timeout = '500ms';
SET SESSION client_min_messages = 'DEBUG1';
step R1_refresh:
CALL refresh_continuous_aggregate('cond_10', 25, 70);
step R12_refresh:
CALL refresh_continuous_aggregate('cond2_10', 25, 70);
starting permutation: R1_refresh R3_refresh
R5: LOG: statement:
SET SESSION lock_timeout = '500ms';
SET SESSION deadlock_timeout = '500ms';
SET SESSION client_min_messages = 'DEBUG1';
step R1_refresh:
CALL refresh_continuous_aggregate('cond_10', 25, 70);
step R3_refresh:
CALL refresh_continuous_aggregate('cond_10', 70, 107);
starting permutation: WP_after_materialization_enable R1_refresh WP_after_materialization_release R3_refresh
R5: LOG: statement:
SET SESSION lock_timeout = '500ms';
SET SESSION deadlock_timeout = '500ms';
SET SESSION client_min_messages = 'DEBUG1';
step WP_after_materialization_enable:
SELECT debug_waitpoint_enable('after_process_cagg_materializations');
debug_waitpoint_enable
----------------------
step R1_refresh:
CALL refresh_continuous_aggregate('cond_10', 25, 70);
<waiting ...>
step WP_after_materialization_release:
SELECT debug_waitpoint_release('after_process_cagg_materializations');
debug_waitpoint_release
-----------------------
step R1_refresh: <... completed>
step R3_refresh:
CALL refresh_continuous_aggregate('cond_10', 70, 107);
starting permutation: WP_after_enable R6_materialization_logs R1_refresh3 R6_materialization_logs RI2_invalidation R2_refresh_left R6_materialization_logs WP_after_release R6_materialization_logs
R5: LOG: statement:
SET SESSION lock_timeout = '500ms';
SET SESSION deadlock_timeout = '500ms';
SET SESSION client_min_messages = 'DEBUG1';
step WP_after_enable:
SELECT debug_waitpoint_enable('after_process_cagg_invalidations_for_refresh_lock');
debug_waitpoint_enable
----------------------
step R6_materialization_logs:
SELECT ca.user_view_name AS cagg,
lowest_modified_value,
greatest_modified_value
FROM _timescaledb_catalog.continuous_aggs_materialization_invalidation_log l
JOIN _timescaledb_catalog.continuous_agg ca ON ca.mat_hypertable_id = l.materialization_id
WHERE ca.user_view_name = 'cond_10'
ORDER BY 1, 2, 3;
cagg |lowest_modified_value|greatest_modified_value
-------+---------------------+-----------------------
cond_10| -9223372036854775808| -1
cond_10| 30| 9223372036854775807
step R1_refresh3:
CALL refresh_continuous_aggregate('cond_10', 60, 70);
<waiting ...>
step R6_materialization_logs:
SELECT ca.user_view_name AS cagg,
lowest_modified_value,
greatest_modified_value
FROM _timescaledb_catalog.continuous_aggs_materialization_invalidation_log l
JOIN _timescaledb_catalog.continuous_agg ca ON ca.mat_hypertable_id = l.materialization_id
WHERE ca.user_view_name = 'cond_10'
ORDER BY 1, 2, 3;
cagg |lowest_modified_value|greatest_modified_value
-------+---------------------+-----------------------
cond_10| -9223372036854775808| -1
cond_10| 0| 39
cond_10| 30| 59
cond_10| 60| 69
cond_10| 70| 9223372036854775807
step RI2_invalidation:
INSERT INTO conditions VALUES (20, 1000), (30, 1000), (40, 1000), (50, 1000), (60, 1000), (70, 1000), (79, 1000);
step R2_refresh_left:
CALL refresh_continuous_aggregate('cond_10', 15, 55);
<waiting ...>
step R6_materialization_logs:
SELECT ca.user_view_name AS cagg,
lowest_modified_value,
greatest_modified_value
FROM _timescaledb_catalog.continuous_aggs_materialization_invalidation_log l
JOIN _timescaledb_catalog.continuous_agg ca ON ca.mat_hypertable_id = l.materialization_id
WHERE ca.user_view_name = 'cond_10'
ORDER BY 1, 2, 3;
cagg |lowest_modified_value|greatest_modified_value
-------+---------------------+-----------------------
cond_10| -9223372036854775808| -1
cond_10| 0| 19
cond_10| 20| 49
cond_10| 50| 79
cond_10| 60| 69
cond_10| 70| 9223372036854775807
step WP_after_release:
SELECT debug_waitpoint_release('after_process_cagg_invalidations_for_refresh_lock');
debug_waitpoint_release
-----------------------
step R1_refresh3: <... completed>
step R2_refresh_left: <... completed>
step R6_materialization_logs:
SELECT ca.user_view_name AS cagg,
lowest_modified_value,
greatest_modified_value
FROM _timescaledb_catalog.continuous_aggs_materialization_invalidation_log l
JOIN _timescaledb_catalog.continuous_agg ca ON ca.mat_hypertable_id = l.materialization_id
WHERE ca.user_view_name = 'cond_10'
ORDER BY 1, 2, 3;
cagg |lowest_modified_value|greatest_modified_value
-------+---------------------+-----------------------
cond_10| -9223372036854775808| -1
cond_10| 0| 19
cond_10| 50| 79
cond_10| 70| 9223372036854775807
starting permutation: WP_before_enable R6_materialization_logs R1_refresh3 R3_refresh_adjacent R6_materialization_logs WP_before_release S1_select R6_materialization_logs
R5: LOG: statement:
SET SESSION lock_timeout = '500ms';
SET SESSION deadlock_timeout = '500ms';
SET SESSION client_min_messages = 'DEBUG1';
step WP_before_enable:
SELECT debug_waitpoint_enable('before_process_cagg_invalidations_for_refresh_lock');
debug_waitpoint_enable
----------------------
step R6_materialization_logs:
SELECT ca.user_view_name AS cagg,
lowest_modified_value,
greatest_modified_value
FROM _timescaledb_catalog.continuous_aggs_materialization_invalidation_log l
JOIN _timescaledb_catalog.continuous_agg ca ON ca.mat_hypertable_id = l.materialization_id
WHERE ca.user_view_name = 'cond_10'
ORDER BY 1, 2, 3;
cagg |lowest_modified_value|greatest_modified_value
-------+---------------------+-----------------------
cond_10| -9223372036854775808| -1
cond_10| 30| 9223372036854775807
step R1_refresh3:
CALL refresh_continuous_aggregate('cond_10', 60, 70);
<waiting ...>
step R3_refresh_adjacent:
CALL refresh_continuous_aggregate('cond_10', 50, 60);
<waiting ...>
step R6_materialization_logs:
SELECT ca.user_view_name AS cagg,
lowest_modified_value,
greatest_modified_value
FROM _timescaledb_catalog.continuous_aggs_materialization_invalidation_log l
JOIN _timescaledb_catalog.continuous_agg ca ON ca.mat_hypertable_id = l.materialization_id
WHERE ca.user_view_name = 'cond_10'
ORDER BY 1, 2, 3;
cagg |lowest_modified_value|greatest_modified_value
-------+---------------------+-----------------------
cond_10| -9223372036854775808| -1
cond_10| 0| 39
cond_10| 30| 9223372036854775807
step WP_before_release:
SELECT debug_waitpoint_release('before_process_cagg_invalidations_for_refresh_lock');
debug_waitpoint_release
-----------------------
step R1_refresh3: <... completed>
step R3_refresh_adjacent: <... completed>
step S1_select:
SELECT bucket, avg_temp
FROM cond_10
ORDER BY 1;
SELECT * FROM cagg_bucket_count('cond_10');
SELECT h.table_name AS hypertable, it.watermark AS threshold
FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold it,
_timescaledb_catalog.hypertable h
WHERE it.hypertable_id = h.id
ORDER BY 1;
bucket| avg_temp
------+----------------
0|15.8888888888889
10| 14.2
20| 13.4
50| 26.9
60| 18.9
cagg_bucket_count
-----------------
5
hypertable | threshold
-----------+-----------
conditions | 70
conditions2|-2147483648
step R6_materialization_logs:
SELECT ca.user_view_name AS cagg,
lowest_modified_value,
greatest_modified_value
FROM _timescaledb_catalog.continuous_aggs_materialization_invalidation_log l
JOIN _timescaledb_catalog.continuous_agg ca ON ca.mat_hypertable_id = l.materialization_id
WHERE ca.user_view_name = 'cond_10'
ORDER BY 1, 2, 3;
cagg |lowest_modified_value|greatest_modified_value
-------+---------------------+-----------------------
cond_10| -9223372036854775808| -1
cond_10| 0| 39
cond_10| 30| 49
cond_10| 70| 9223372036854775807
starting permutation: WP_after_enable R1_refresh3 L4_lock_mat_invals R2_refresh_left WP_after_release L4_unlock_mat_invals S1_select
R5: LOG: statement:
SET SESSION lock_timeout = '500ms';
SET SESSION deadlock_timeout = '500ms';
SET SESSION client_min_messages = 'DEBUG1';
step WP_after_enable:
SELECT debug_waitpoint_enable('after_process_cagg_invalidations_for_refresh_lock');
debug_waitpoint_enable
----------------------
step R1_refresh3:
CALL refresh_continuous_aggregate('cond_10', 60, 70);
<waiting ...>
step L4_lock_mat_invals:
BEGIN;
LOCK _timescaledb_catalog.continuous_aggs_materialization_invalidation_log
IN ACCESS EXCLUSIVE MODE;
step R2_refresh_left:
CALL refresh_continuous_aggregate('cond_10', 15, 55);
<waiting ...>
step WP_after_release:
SELECT debug_waitpoint_release('after_process_cagg_invalidations_for_refresh_lock');
debug_waitpoint_release
-----------------------
step L4_unlock_mat_invals:
ROLLBACK;
step R1_refresh3: <... completed>
step R2_refresh_left: <... completed>
step S1_select:
SELECT bucket, avg_temp
FROM cond_10
ORDER BY 1;
SELECT * FROM cagg_bucket_count('cond_10');
SELECT h.table_name AS hypertable, it.watermark AS threshold
FROM _timescaledb_catalog.continuous_aggs_invalidation_threshold it,
_timescaledb_catalog.hypertable h
WHERE it.hypertable_id = h.id
ORDER BY 1;
bucket| avg_temp
------+----------------
0|15.8888888888889
10| 14.2
20|14.2380952380952
30| 18.3
40|16.0909090909091
60| 18.9
cagg_bucket_count
-----------------
6
hypertable | threshold
-----------+-----------
conditions | 70
conditions2|-2147483648