Skip to content
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

Add apply-count parameter #392

Merged

Conversation

alex-richman-onesignal
Copy link
Contributor

@alex-richman-onesignal alex-richman-onesignal commented Apr 12, 2024

  • Add a new apply-count command line parameter to allow tuning of the REDO apply_count variable.
  • Check on startup that switch_threshold is not greater or equal to apply_count, which would cause REDO to stop after the first apply_log call (fwiw this bug also exists in 1.5.0, since switch_threshold parameter was added but was not checked against the default APPLY_COUNT of 1000).
  • Tuning apply_count might be useful for improving REDO performance on tables with small tuples that receive lots of updates.
  • Fixes Validate switch_threshold parameter is not greater than or equal to APPLY_COUNT #393

@za-arthur
Copy link
Collaborator

Thanks! No objections from my side.

Could you add documentation and tests like here: https://github.com/reorg/pg_repack/pull/347/files#diff-1b3cd3a9c0b8b485f72c559854e6db0705069ce3e995fa25972825d9dcae359a.

@andreasscherbaum
Copy link
Collaborator

Agree with Artur. A test would be nice to have. Otherwise it's a good addition.

@alex-richman-onesignal alex-richman-onesignal force-pushed the ar-add-apply-count-parameter branch from b818f9f to 2fbe4be Compare April 15, 2024 11:56
@alex-richman-onesignal
Copy link
Contributor Author

Thanks both, added a few tests and a doc line.

@za-arthur
Copy link
Collaborator

Thanks for the fix. I'm merging the PR.

@za-arthur za-arthur merged commit aae9f2f into reorg:master Apr 15, 2024
10 checks passed
@alex-richman-onesignal
Copy link
Contributor Author

alex-richman-onesignal commented Apr 15, 2024 via email

@za-arthur
Copy link
Collaborator

AFAIK we don't have a release schedule. We could make a release after accumulating few more fixes.

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

Successfully merging this pull request may close these issues.

Validate switch_threshold parameter is not greater than or equal to APPLY_COUNT
5 participants