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

Can't get cargo pgrx init to compile Postgres on more than one core #1916

Closed
jawj opened this issue Oct 12, 2024 · 3 comments
Closed

Can't get cargo pgrx init to compile Postgres on more than one core #1916

jawj opened this issue Oct 12, 2024 · 3 comments

Comments

@jawj
Copy link

jawj commented Oct 12, 2024

I'm setting up an Ubuntu 24.04 VM (using https://multipass.run on an M3 Pro MacBook Pro) to compile and test a pgrx extension.

I set the VM up with 4 cores, 4GB RAM and 20GB disk.

When I run cargo pgrx init --pg16 download, Postgres compilation is stuck on one core, and it doesn't help to specify --jobs 4. That makes it very slow, of course.

Subsequently, cargo pgrx install is able to max out all 4 cores.

Any ideas what could be the problem here?

This is everything that's run on a fresh VM:

sudo apt update
sudo apt upgrade -y
sudo apt install -y build-essential pkg-config libssl-dev libreadline-dev zlib1g-dev libicu-dev libclang-dev

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"

cargo install --locked [email protected]
cargo pgrx init --pg16 download
@SteveLauC
Copy link
Contributor

From the source code, the value configured in --jobs will be passed to Client::new(limit), looks like this jobslot library is used to limit the number of uppermost make command that could be executed at the same time, and if so, I guess it is not related to make -j

@SteveLauC
Copy link
Contributor

Related to #1903

@jawj
Copy link
Author

jawj commented Oct 12, 2024

OK, closing as a dupe of #1903.

@jawj jawj closed this as completed Oct 12, 2024
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

No branches or pull requests

2 participants