Skip to content

cargo-pgrx: add --valgrind flag to cargo pgrx regress#2290

Open
philippemnoel wants to merge 1 commit into
pgcentralfoundation:developfrom
philippemnoel:add-valgrind-flag-to-regress
Open

cargo-pgrx: add --valgrind flag to cargo pgrx regress#2290
philippemnoel wants to merge 1 commit into
pgcentralfoundation:developfrom
philippemnoel:add-valgrind-flag-to-regress

Conversation

@philippemnoel
Copy link
Copy Markdown
Contributor

@philippemnoel philippemnoel commented May 15, 2026

Summary

cargo pgrx start and cargo pgrx run already accept --valgrind, and the underlying start_postgres already knows how to launch Postgres under valgrind. But the flag was not exposed on cargo pgrx regressFrom<&Regress> for Run hardcoded valgrind: false, so there was no way to run the regression suite under valgrind without manually starting Postgres beforehand.

This adds --valgrind to Regress and propagates it through to Run. No new mechanism — just plumbing.

$ cargo pgrx regress --valgrind

Test plan

  • cargo check -p cargo-pgrx passes
  • cargo pgrx regress --help shows the new --valgrind flag
  • cargo pgrx regress --valgrind runs the regression suite under valgrind end-to-end

`cargo pgrx start` and `cargo pgrx run` already accept `--valgrind` and
the underlying `start_postgres` already knows how to launch Postgres
under valgrind, but the flag was not exposed on `cargo pgrx regress`:
`From<&Regress> for Run` hardcoded `valgrind: false`, so there was no
way to run the regression suite under valgrind without manually
starting Postgres first.

This adds the flag to `Regress` and propagates it through to `Run`.
@philippemnoel
Copy link
Copy Markdown
Contributor Author

The "verify package can build / ubuntu" run will be fixed once #2292 is merged

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.

1 participant