-
Notifications
You must be signed in to change notification settings - Fork 52
Adding --exclude support for last_vacuum and last_analyze #379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
It should be taken into considerations. What you don't want is a partition_table (the mother) = 0 |
|
I think skipping table with zero tuple is a regression. But the option would be nice. As for the partition thing mentionned by @robinportigliatti, 'Declarative Partition" |
|
To keep things simple and clean, I remove the n_live_tup condition and focus the patch on pattern management. Thanks for your return, Regards, |
38e231b to
6b1dcd2
Compare
| my $maintenance_count = 0; | ||
| my $maintenance_count_auto = 0; | ||
| my $maintenance_max = -1; | ||
| my $maintenance_hash = 'null'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the proper way to specify this.
@ioguix ?
| } | ||
|
|
||
| } | ||
| push @perfdata => [ $db, $maintenance_max, 's', $w_limit, $c_limit ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When maintenance_max=Infinity we display Infinitys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be fixed. Can you fix this @SkyMarshall939 ?
|
@ioguix @Krysztophe That's about all I can do review-wise in perl. |
|
It needs a rebase. |
5f02b85 to
7a4f226
Compare
|
rebased |
|
@SkyMarshall939 If you want to skim through the patch again ... that would be helpful (I don't think I broke anything else but me and perl ...). which kinda hints at the need for tests for this patch |
|
just found another few dumb mistakes. will post a fix soon. |
I missed a label since pg_class and pg_stat_user_tables both have relname. I did't shift the array access by one after merging the patch that adds a pg_is_in_recovery. I discovered autovivification, I feel dirty now.
|
Ok ... fixed ... for good .. hopefully. I feel dumb, I should have tested. Also, I feel dirty: I discovered autovivification (accessing an empty nested struct creates it): this is pure madness. |
Hello,
Here is a proposal for improvements to the last_vacuum & last_analyze services. The purpose is to add support for the
--excludeparameter for these services in order to be able to exclude X schemas and/or X relations.Changes
=> Change NaN to -1 to allow counters to be accumulated in Perl code.
=> Add current_database(), schemaname and relname in the last_[analyze|vacuum] query.
=> Relations with n_live_tup = 0 are no longer taken.
How
Classic use of the service concerned by adding the
--excludeparameter which takes REGEXP .I remain available for any exchange,
Best regards,