|
1 | | -Parsed test spec with 7 sessions |
| 1 | +Parsed test spec with 8 sessions |
2 | 2 |
|
3 | 3 | starting permutation: wp_enable r1_run s1_refresh_ranges s1_count r2_refresh wp_release s1_count s1_check_duplicates |
4 | 4 | step wp_enable: |
@@ -113,6 +113,11 @@ R3: LOG: statement: |
113 | 113 | SET SESSION client_min_messages = 'LOG'; |
114 | 114 | SET timescaledb.current_timestamp_mock TO '2026-04-01 00:30:00+00'; |
115 | 115 |
|
| 116 | +R4: LOG: statement: |
| 117 | + SET SESSION lock_timeout = '500ms'; |
| 118 | + SET SESSION deadlock_timeout = '500ms'; |
| 119 | + SET SESSION client_min_messages = 'LOG'; |
| 120 | + |
116 | 121 | step wp_enable: |
117 | 122 | SELECT debug_waitpoint_enable('cagg_policy_batch_2_after_txn_1_wait'); |
118 | 123 |
|
@@ -241,6 +246,11 @@ R3: LOG: statement: |
241 | 246 | SET SESSION client_min_messages = 'LOG'; |
242 | 247 | SET timescaledb.current_timestamp_mock TO '2026-04-01 00:30:00+00'; |
243 | 248 |
|
| 249 | +R4: LOG: statement: |
| 250 | + SET SESSION lock_timeout = '500ms'; |
| 251 | + SET SESSION deadlock_timeout = '500ms'; |
| 252 | + SET SESSION client_min_messages = 'LOG'; |
| 253 | + |
244 | 254 | step wp_enable: |
245 | 255 | SELECT debug_waitpoint_enable('cagg_policy_batch_2_after_txn_1_wait'); |
246 | 256 |
|
@@ -357,6 +367,11 @@ R3: LOG: statement: |
357 | 367 | SET SESSION client_min_messages = 'LOG'; |
358 | 368 | SET timescaledb.current_timestamp_mock TO '2026-04-01 00:30:00+00'; |
359 | 369 |
|
| 370 | +R4: LOG: statement: |
| 371 | + SET SESSION lock_timeout = '500ms'; |
| 372 | + SET SESSION deadlock_timeout = '500ms'; |
| 373 | + SET SESSION client_min_messages = 'LOG'; |
| 374 | + |
360 | 375 | step wp_enable: |
361 | 376 | SELECT debug_waitpoint_enable('cagg_policy_batch_2_after_txn_1_wait'); |
362 | 377 |
|
@@ -448,6 +463,11 @@ R3: LOG: statement: |
448 | 463 | SET SESSION client_min_messages = 'LOG'; |
449 | 464 | SET timescaledb.current_timestamp_mock TO '2026-04-01 00:30:00+00'; |
450 | 465 |
|
| 466 | +R4: LOG: statement: |
| 467 | + SET SESSION lock_timeout = '500ms'; |
| 468 | + SET SESSION deadlock_timeout = '500ms'; |
| 469 | + SET SESSION client_min_messages = 'LOG'; |
| 470 | + |
451 | 471 | step wp_enable: |
452 | 472 | SELECT debug_waitpoint_enable('cagg_policy_batch_2_after_txn_1_wait'); |
453 | 473 |
|
@@ -521,3 +541,203 @@ R3: LOG: continuous aggregate refresh (individual invalidation) on "sensor_hour |
521 | 541 | R3: LOG: deleted 2 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
522 | 542 | R3: LOG: inserted 2 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
523 | 543 | step r3_run_oldest_first: <... completed> |
| 544 | + |
| 545 | +starting permutation: wp_enable r4_run s1_refresh_ranges s1_count r2_refresh wp_release s1_count s1_check_duplicates |
| 546 | +R1: LOG: statement: |
| 547 | + SET SESSION lock_timeout = '500ms'; |
| 548 | + SET SESSION deadlock_timeout = '500ms'; |
| 549 | + SET SESSION client_min_messages = 'LOG'; |
| 550 | + |
| 551 | +R2: LOG: statement: |
| 552 | + SET SESSION lock_timeout = '500ms'; |
| 553 | + SET SESSION deadlock_timeout = '500ms'; |
| 554 | + SET SESSION client_min_messages = 'LOG'; |
| 555 | + |
| 556 | +R3: LOG: statement: |
| 557 | + SET SESSION lock_timeout = '500ms'; |
| 558 | + SET SESSION deadlock_timeout = '500ms'; |
| 559 | + SET SESSION client_min_messages = 'LOG'; |
| 560 | + SET timescaledb.current_timestamp_mock TO '2026-04-01 00:30:00+00'; |
| 561 | + |
| 562 | +R4: LOG: statement: |
| 563 | + SET SESSION lock_timeout = '500ms'; |
| 564 | + SET SESSION deadlock_timeout = '500ms'; |
| 565 | + SET SESSION client_min_messages = 'LOG'; |
| 566 | + |
| 567 | +step wp_enable: |
| 568 | + SELECT debug_waitpoint_enable('cagg_policy_batch_2_after_txn_1_wait'); |
| 569 | + |
| 570 | +debug_waitpoint_enable |
| 571 | +---------------------- |
| 572 | + |
| 573 | + |
| 574 | +R4: LOG: statement: |
| 575 | + CALL refresh_continuous_aggregate( |
| 576 | + 'cond_10', NULL, NULL, |
| 577 | + options => jsonb_build_object('buckets_per_batch', 1)); |
| 578 | + |
| 579 | +R4: LOG: deleted 0 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 580 | +R4: LOG: inserted 3 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 581 | +step r4_run: |
| 582 | + CALL refresh_continuous_aggregate( |
| 583 | + 'cond_10', NULL, NULL, |
| 584 | + options => jsonb_build_object('buckets_per_batch', 1)); |
| 585 | + <waiting ...> |
| 586 | +step s1_refresh_ranges: |
| 587 | + SELECT ca.user_view_name AS cagg_name, r.start_range, r.end_range |
| 588 | + FROM _timescaledb_catalog.continuous_aggs_jobs_refresh_ranges r |
| 589 | + JOIN _timescaledb_catalog.continuous_agg ca ON r.materialization_id = ca.mat_hypertable_id |
| 590 | + ORDER BY ca.user_view_name; |
| 591 | + |
| 592 | +cagg_name|start_range|end_range |
| 593 | +---------+-----------+--------- |
| 594 | +cond_10 | 50| 60 |
| 595 | + |
| 596 | +step s1_count: |
| 597 | + SELECT count(*) AS row_count FROM cond_10; |
| 598 | + |
| 599 | +row_count |
| 600 | +--------- |
| 601 | + 18 |
| 602 | + |
| 603 | +R2: LOG: statement: |
| 604 | + -- Non-overlapping with R1's registered batch range [50, 60) |
| 605 | + CALL refresh_continuous_aggregate('cond_10', 1, 50); |
| 606 | + |
| 607 | +R2: LOG: deleted 12 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 608 | +R2: LOG: inserted 12 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 609 | +step r2_refresh: |
| 610 | + -- Non-overlapping with R1's registered batch range [50, 60) |
| 611 | + CALL refresh_continuous_aggregate('cond_10', 1, 50); |
| 612 | + |
| 613 | +step wp_release: |
| 614 | + SELECT debug_waitpoint_release('cagg_policy_batch_2_after_txn_1_wait'); |
| 615 | + |
| 616 | +debug_waitpoint_release |
| 617 | +----------------------- |
| 618 | + |
| 619 | + |
| 620 | +R4: LOG: deleted 3 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 621 | +R4: LOG: inserted 3 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 622 | +R4: LOG: deleted 0 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 623 | +R4: LOG: inserted 3 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 624 | +step r4_run: <... completed> |
| 625 | +step s1_count: |
| 626 | + SELECT count(*) AS row_count FROM cond_10; |
| 627 | + |
| 628 | +row_count |
| 629 | +--------- |
| 630 | + 21 |
| 631 | + |
| 632 | +step s1_check_duplicates: |
| 633 | + -- Check for duplicate (bucket, device_id) rows in the materialization hypertable. |
| 634 | + -- If duplicates exist, the same range was materialized twice without proper cleanup. |
| 635 | + SELECT bucket, device_id, count(*) AS copies |
| 636 | + FROM cond_10 |
| 637 | + GROUP BY bucket, device_id |
| 638 | + HAVING count(*) > 1 |
| 639 | + ORDER BY bucket, device_id; |
| 640 | + |
| 641 | +bucket|device_id|copies |
| 642 | +------+---------+------ |
| 643 | + |
| 644 | + |
| 645 | +starting permutation: wp_enable r4_run s1_refresh_ranges r2_refresh_overlap wp_release s1_count s1_check_duplicates |
| 646 | +R1: LOG: statement: |
| 647 | + SET SESSION lock_timeout = '500ms'; |
| 648 | + SET SESSION deadlock_timeout = '500ms'; |
| 649 | + SET SESSION client_min_messages = 'LOG'; |
| 650 | + |
| 651 | +R2: LOG: statement: |
| 652 | + SET SESSION lock_timeout = '500ms'; |
| 653 | + SET SESSION deadlock_timeout = '500ms'; |
| 654 | + SET SESSION client_min_messages = 'LOG'; |
| 655 | + |
| 656 | +R3: LOG: statement: |
| 657 | + SET SESSION lock_timeout = '500ms'; |
| 658 | + SET SESSION deadlock_timeout = '500ms'; |
| 659 | + SET SESSION client_min_messages = 'LOG'; |
| 660 | + SET timescaledb.current_timestamp_mock TO '2026-04-01 00:30:00+00'; |
| 661 | + |
| 662 | +R4: LOG: statement: |
| 663 | + SET SESSION lock_timeout = '500ms'; |
| 664 | + SET SESSION deadlock_timeout = '500ms'; |
| 665 | + SET SESSION client_min_messages = 'LOG'; |
| 666 | + |
| 667 | +step wp_enable: |
| 668 | + SELECT debug_waitpoint_enable('cagg_policy_batch_2_after_txn_1_wait'); |
| 669 | + |
| 670 | +debug_waitpoint_enable |
| 671 | +---------------------- |
| 672 | + |
| 673 | + |
| 674 | +R4: LOG: statement: |
| 675 | + CALL refresh_continuous_aggregate( |
| 676 | + 'cond_10', NULL, NULL, |
| 677 | + options => jsonb_build_object('buckets_per_batch', 1)); |
| 678 | + |
| 679 | +R4: LOG: deleted 0 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 680 | +R4: LOG: inserted 3 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 681 | +step r4_run: |
| 682 | + CALL refresh_continuous_aggregate( |
| 683 | + 'cond_10', NULL, NULL, |
| 684 | + options => jsonb_build_object('buckets_per_batch', 1)); |
| 685 | + <waiting ...> |
| 686 | +step s1_refresh_ranges: |
| 687 | + SELECT ca.user_view_name AS cagg_name, r.start_range, r.end_range |
| 688 | + FROM _timescaledb_catalog.continuous_aggs_jobs_refresh_ranges r |
| 689 | + JOIN _timescaledb_catalog.continuous_agg ca ON r.materialization_id = ca.mat_hypertable_id |
| 690 | + ORDER BY ca.user_view_name; |
| 691 | + |
| 692 | +cagg_name|start_range|end_range |
| 693 | +---------+-----------+--------- |
| 694 | +cond_10 | 50| 60 |
| 695 | + |
| 696 | +R2: LOG: statement: |
| 697 | + -- Overlapping with R1's registered batch range [50, 60) |
| 698 | + CALL refresh_continuous_aggregate('cond_10', 40, 60); |
| 699 | + |
| 700 | +step r2_refresh_overlap: |
| 701 | + -- Overlapping with R1's registered batch range [50, 60) |
| 702 | + CALL refresh_continuous_aggregate('cond_10', 40, 60); |
| 703 | + |
| 704 | +ERROR: could not refresh continuous aggregate "cond_10" due to a concurrent refresh |
| 705 | +step wp_release: |
| 706 | + SELECT debug_waitpoint_release('cagg_policy_batch_2_after_txn_1_wait'); |
| 707 | + |
| 708 | +debug_waitpoint_release |
| 709 | +----------------------- |
| 710 | + |
| 711 | + |
| 712 | +R4: LOG: deleted 3 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 713 | +R4: LOG: inserted 3 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 714 | +R4: LOG: deleted 3 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 715 | +R4: LOG: inserted 3 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 716 | +R4: LOG: deleted 3 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 717 | +R4: LOG: inserted 3 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 718 | +R4: LOG: deleted 3 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 719 | +R4: LOG: inserted 3 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 720 | +R4: LOG: deleted 3 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 721 | +R4: LOG: inserted 3 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 722 | +R4: LOG: deleted 0 row(s) from materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 723 | +R4: LOG: inserted 3 row(s) into materialization table "_timescaledb_internal._materialized_hypertable_X" |
| 724 | +step r4_run: <... completed> |
| 725 | +step s1_count: |
| 726 | + SELECT count(*) AS row_count FROM cond_10; |
| 727 | + |
| 728 | +row_count |
| 729 | +--------- |
| 730 | + 21 |
| 731 | + |
| 732 | +step s1_check_duplicates: |
| 733 | + -- Check for duplicate (bucket, device_id) rows in the materialization hypertable. |
| 734 | + -- If duplicates exist, the same range was materialized twice without proper cleanup. |
| 735 | + SELECT bucket, device_id, count(*) AS copies |
| 736 | + FROM cond_10 |
| 737 | + GROUP BY bucket, device_id |
| 738 | + HAVING count(*) > 1 |
| 739 | + ORDER BY bucket, device_id; |
| 740 | + |
| 741 | +bucket|device_id|copies |
| 742 | +------+---------+------ |
| 743 | + |
0 commit comments