Commit 7bc069d
authored
[*] fix maintenance task to delete entries of dropped tables (#1020)
* introduce `--maintenance-interval` flag
* modify `--retention` to accept PostgreSQL interval string.
* Use new flags to control deletion and maintenance tasks.
* Test `MaintainUniqueSources()` and `DeleteOldPartitions()`
* update docs reference page to mention new flag.
* run `DeleteOldPartitions()` with `retentionInterval` not `maintenanceInterval`
* Rename test
* Capitalize `set` in flag description.
* Fix typo in comment
* Update maintenance task to remove entries of dropped metric tables from listing table.
* Test removing entries of dropped tables from the listing table.
* Add empty line at end of file
* Ensure there is no error dropping table
* Use `!=` operator instead of `NOT ... = ...`
* Preserve `public.` prefix in `sqlDistinct` query
* substitue `break` with `continue` to avoid breaking
the loop without trimming all elements in `allDistinctMetricTables`
* this is more informative in the logs also.1 parent a2d1faa commit 7bc069d
2 files changed
+22
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| 523 | + | |
523 | 524 | | |
524 | 525 | | |
525 | 526 | | |
| |||
545 | 546 | | |
546 | 547 | | |
547 | 548 | | |
548 | | - | |
| 549 | + | |
549 | 550 | | |
550 | 551 | | |
| 552 | + | |
551 | 553 | | |
| 554 | + | |
| 555 | + | |
552 | 556 | | |
553 | 557 | | |
554 | 558 | | |
555 | 559 | | |
556 | 560 | | |
557 | | - | |
558 | | - | |
| 561 | + | |
| 562 | + | |
559 | 563 | | |
560 | 564 | | |
561 | 565 | | |
| |||
589 | 593 | | |
590 | 594 | | |
591 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
592 | 602 | | |
593 | 603 | | |
594 | 604 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
707 | 716 | | |
708 | 717 | | |
709 | 718 | | |
| |||
0 commit comments