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

Use multiple processors when PGUpgrade is given CPU resources #4043

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

cbandy
Copy link
Member

@cbandy cbandy commented Dec 5, 2024

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • New feature

What is the current behavior (link to any open issues here)?

PGUpgrade always runs pg_upgrade as a single process.

What is the new behavior (if this is a feature change)?

PGUpgrade always runs pg_upgrade with a --jobs argument.

The value to that argument is >1 when the PGUpgradeCPUConcurrency feature is enabled and PGUpgrade specifies more than 3 CPUs.

Other Information:

Issue: PGO-1958

The --jobs flag allows for some aspects of pg_upgrade to operate in
parallel. The documentation says:

    This option can dramatically reduce the time to upgrade
    a multi-database server running on a multiprocessor machine.

Issue: PGO-1958
See: https://www.postgresql.org/docs/current/pgupgrade.html
@cbandy

This comment was marked as outdated.

Copy link
Contributor

@tony-landreth tony-landreth left a comment

Choose a reason for hiding this comment

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

LGTM

@cbandy cbandy merged commit 5fae3e9 into CrunchyData:main Dec 9, 2024
17 checks passed
@cbandy cbandy deleted the upgrade-jobs branch December 9, 2024 21:50
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.

2 participants