Skip to content

Upgrade pg_durable to pgrx v0.18.1#209

Open
eeeebbbbrrrr wants to merge 4 commits into
microsoft:mainfrom
eeeebbbbrrrr:pgrx-0.18.1-upgrade
Open

Upgrade pg_durable to pgrx v0.18.1#209
eeeebbbbrrrr wants to merge 4 commits into
microsoft:mainfrom
eeeebbbbrrrr:pgrx-0.18.1-upgrade

Conversation

@eeeebbbbrrrr
Copy link
Copy Markdown

@eeeebbbbrrrr eeeebbbbrrrr commented Jun 5, 2026

This PR upgrades the project to pgrx v0.18.1 in 7e7d0c2 and then fixes some issues running the test suite on macOS in e275752.

As evidenced by the commit attributions, this was 100% written by Claude.

Nonetheless, pgrx v0.18.1 is a significant upgrade over 0.16.1 as it completely eliminates a full round of compilation on every build, which ought to make CI and your developers of this project a lot happier.

I'm happy to participate in the review of this and cleanup anything y'all think is necessary.

The test suite passed locally for me on macOS (with e275752) for pg17 and pg18. I did not run the Docker e2e tests as I do not (and will not ever) have Docker installed.

eeeebbbbrrrr and others added 2 commits June 5, 2026 16:38
Follows the pgrx v0.18.0 migration guide:

- Bump pgrx and pgrx-tests to =0.18.1.
- Adopt the "one compilation pass" model: drop the `pgrx_embed`
  binary (delete src/bin/pgrx_embed.rs and its [[bin]] entry) and
  reduce the library crate-type from ["cdylib", "lib"] to ["cdylib"].

No source changes were required: the extension has no manual
SqlTranslatable impls, no cfg(pgrx_embed) conditionals, and already
uses the modern pg_module_magic!(name, version) form.

Verified on PG17 and PG18: 145 unit/pg_test tests pass and all 6
pg_regress tests pass on both versions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
These are local-developer ergonomics fixes for running the pg_regress
workflow (`make test-regress`) on macOS; they do not affect the
extension or CI on Linux.

- set_pg_conf: `sed -i` without a backup suffix and the `\s` escape are
  GNU-only. BSD/macOS sed treated the substitution as a backup suffix
  and aborted ("invalid command code"). Use `sed -i.bak` (then remove
  the backup) and POSIX `[[:space:]]`, matching the other scripts.

- Pass `-X` to all scripted psql invocations so a developer's ~/.psqlrc
  cannot corrupt captured output. With `\timing on` set in .psqlrc, the
  "Time: 1.778 ms" line leaked into the database-existence check, where
  `grep -q 1` matched the "1" in the timing and wrongly concluded the
  contrib_regression database already existed, skipping its creation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@eeeebbbbrrrr
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@pinodeca
Copy link
Copy Markdown
Contributor

pinodeca commented Jun 5, 2026

@eeeebbbbrrrr thanks for the contribution! Looks like we need to update some of our GHA workflows - awkward to do without pipeline permissions. I'll look into it.

pinodeca pushed a commit to eeeebbbbrrrr/pg_durable that referenced this pull request Jun 5, 2026
@pinodeca
Copy link
Copy Markdown
Contributor

pinodeca commented Jun 5, 2026

@eeeebbbbrrrr, thanks for setting "Maintainers are allowed to edit this pull request." I pushed (and later removed) a test commit to your branch because I haven't worked with this feature before. In a few minutes I'll push a commit with real content.

@pinodeca pinodeca force-pushed the pgrx-0.18.1-upgrade branch from 125c443 to e275752 Compare June 5, 2026 21:54
gdecandia added 2 commits June 5, 2026 21:58
Align the cargo-pgrx toolchain version with the pgrx/pgrx-tests crate
upgrade to 0.18.1. cargo-pgrx and pgrx must be the same version, so the
stale 0.16.1 pins caused all jobs running 'cargo pgrx' (build, package,
test, e2e) to fail while pure-cargo jobs passed.

Updates the version pin and cache keys in ci.yml, copilot-setup-steps.yml,
package-release.yml, Dockerfile, and the dev container setup script.
Update version references in NOTICE (attribution), README, copilot
instructions, Codespaces prebuild docs, and the security-review threat
model to reflect the pgrx 0.18.1 upgrade. Reword the superuser GUC note
to drop the version-specific pin since the NO_SHOW_ALL guidance is
version-independent.
@pinodeca pinodeca deployed to copilot June 5, 2026 22:05 — with GitHub Actions Active
@eeeebbbbrrrr
Copy link
Copy Markdown
Author

No worries, do what cha need to do. Looks like "All checks have passed" so that's good news.

@eeeebbbbrrrr
Copy link
Copy Markdown
Author

Looks like I should have asked Claude to check all the files. Next time.

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.

3 participants