Skip to content

Partition Manager Review #4

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

Closed
wants to merge 66 commits into from
Closed

Partition Manager Review #4

wants to merge 66 commits into from

Conversation

aarongable
Copy link

This PR exists for the purpose of allowing folks an easy way to provide
file- and line-specific comments.

The base branch (pr-base) consists of a single empty commit.
The PR branch (pr-branch) consists of the entire history of the main
branch, rebased on top of pr-base. This convinces GitHub to allow us
to create a reviewable PR.

DO NOT SUBMIT, it wouldn't do any good, this code is all in main already.

jcjones added 30 commits April 20, 2021 17:17
- This moves from the -E to -X XML-based CLI and parses it
This removes any dependnecy on the auto-increment value, as AI can only tell
us a single column's position, and for multi-column partitions we'll need
more than that.

This change does not totally remove the get_autoincrement method, as we'll
still want to confirm the table has the partitioned feature, which we'll do
in a next commit.
This adds the necessary retention options for later command processing, which
is not included in this commit.
There are other BY RANGE options too, but let's just start with COLUMNS
…e Maintain algo

The README.md expresses the "Maintain" algorithm in its ideal form, which got
messy in implementation. The get_pending_sql_reorganize_partition_commands makes
that clean again, so that there's a clear map to the algorithm description.
@beautifulentropy beautifulentropy self-requested a review August 4, 2021 17:53
jcjones and others added 7 commits August 18, 2021 14:06
In the real world, we might mess up when naming a partition. This should be
rare if partitionmanager is running often, since it'll rename partitions
to match reality, but when it's running only rarely, things get out of date.

This change avoids attempting to calculate rates-of-change using partitions
that don't make sense - e.g., today is July 1, and our active partition
says it starts in a week. That is plainly wrong, but we can still use our
current rate-of-change.
Co-authored-by: Samantha <[email protected]>
Co-authored-by: Tim Geoghegan <[email protected]>
Copy link

@tgeoghegan tgeoghegan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one more nit but LGTM!

@jcjones
Copy link
Collaborator

jcjones commented Sep 20, 2021

Closed by 51e10be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants