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

Parallel cargo pgrx package errors #1798

Open
owenthereal opened this issue Aug 12, 2024 · 4 comments
Open

Parallel cargo pgrx package errors #1798

owenthereal opened this issue Aug 12, 2024 · 4 comments
Labels
cargo-pgrx diagnostics docs Improvements or additions to documentation

Comments

@owenthereal
Copy link

owenthereal commented Aug 12, 2024

I'm trying to run multiple pgrx builds against different Postgres versions in parallel with the following (For example for both pg 14 & pg 15):

cargo pgrx init --pg${PG_VERSION} ${PG_CONFIG}
cargo pgrx package --pg-config ${PG_CONFIG} --out-dir ${DESTDIR}

And I got errors like Error: Postgres pg15 is not managed by pgrx. If I run pgrx build once at a time for a pg version, things work fine.

Related: pgxman/pgxman#216
Build logs: https://github.com/pgxman/buildkit/actions/runs/10356208551/job/28665586672

@eeeebbbbrrrr
Copy link
Contributor

You might want to give each job its own $PGRX_HOME as well.

Otherwise, do the init job first, you can specify multiple --pg${PG_VERSION=${PG_CONFIG} paths.

@eeeebbbbrrrr
Copy link
Contributor

I should have explained that if each job shares the same $PGRX_HOME, then they share the same config.toml file, which is created new by each call to cargo pgrx init ....

@owenthereal
Copy link
Author

owenthereal commented Aug 12, 2024

Ah, cool, I didn't know config.toml can be shared for multiple jobs. Thanks for clarifying. Yeah, it would be nice to document this behaviour to avoid multiple parallel jobs sharing the same $PGRX_HOME.

@workingjubilee
Copy link
Member

We need to document, diagnose, or change cargo-pgrx to support this without exploding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cargo-pgrx diagnostics docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants