Skip to content

Decouple pgrx test socket dir from PGDATA#2334

Merged
eeeebbbbrrrr merged 1 commit into
developfrom
test-framework-pgdata-socketdir
Jun 23, 2026
Merged

Decouple pgrx test socket dir from PGDATA#2334
eeeebbbbrrrr merged 1 commit into
developfrom
test-framework-pgdata-socketdir

Conversation

@eeeebbbbrrrr

Copy link
Copy Markdown
Contributor

Decouples the cargo pgrx test Postgres Unix socket directory from the test PGDATA directory.

PGDATA remains unique per test invocation with the existing PGVER-PID suffix, so concurrent cargo pgrx test processes still get isolated clusters. On Unix, the test harness now uses a separate socket directory under /tmp/pgrx-test-sockets-PGVER-PID, avoiding workspace-mounted filesystem permission issues while keeping socket paths short.

Changes

  • Preserve per-invocation PGDATA directories for concurrent test runs.
  • Add a separate per-invocation Unix socket directory for test Postgres.
  • Point unix_socket_directories at the socket dir instead of the PGDATA parent.
  • Create the socket dir as the --runas user when CARGO_PGRX_TEST_RUNAS is set.
  • Clean up both the per-run PGDATA and socket dir at shutdown.
  • Update cargo-pgrx README test harness docs.

@eeeebbbbrrrr
eeeebbbbrrrr merged commit d4a0b24 into develop Jun 23, 2026
16 checks passed
eeeebbbbrrrr added a commit that referenced this pull request Jun 23, 2026
Welcome to pgrx v0.19.1. A followup to v0.19.0 that resolves some
missing Postgres pg19 symbols and cleans up how cargo-pgrx's test
framework manages postgres socket directories.

As always run `cargo install cargo-pgrx --version 0.19.1 --locked` and
run `cargo pgrx upgrade` to fixup your extension crates.

See the [release notes for
v0.19.0](https://github.com/pgcentralfoundation/pgrx/releases/tag/v0.19.0)
for details.

## What's Changed
* Decouple pgrx test socket dir from PGDATA by @eeeebbbbrrrr in
#2334
* restore missing binding symbols for pg19 by @eeeebbbbrrrr in
#2335


**Full Changelog**:
v0.19.0...v0.19.1
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