Skip to content

Update Rust crate pgrx to 0.14.0 #7

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 25, 2025

This PR contains the following updates:

Package Type Update Change
pgrx dependencies minor 0.12.6 -> 0.14.0

Release Notes

pgcentralfoundation/pgrx (pgrx)

v0.14.0

Compare Source

Welcome to pgrx v0.14.0!

This is our very first release with Windows support. How cool is that? 😎 Much thanks go to all the contributors that have been working on Windows support for so long. There's basic instructions for getting started in the project README.

Beyond that, this release officially removes support for Postgres v12. If you still need to support it, you'll need to lock your dependencies to pgrx v0.13.1.

Additionally, there's a number of bugfixes, more included Postgres headers, and some breaking code changes that'll need attention.

As always, make sure to first install cargo-pgrx with cargo install cargo-pgrx --version 0.14.0 --locked and to update your extension Cargo.toml files using our cargo pgrx upgrade tool.

What's Changed

Windows Support

One important note for Windows Support:

If an extension is compiled for Windows, the pgrx cshim feature must be enabled. If an extension does not enable the cshim feature in its Cargo.toml, cargo build --features pgrx/cshim can be used at build time.

This change (using extern "C-unwind") is important to call out separately as it'll require any functions with #[pg_guard] to be changed to use "C-unwind". This came about as a requirement for Windows, but is necessary for all supported platforms.

Breaking Changes

  • pgrx::pg_guard: functions marked with #[pg_guard] must use the C-unwind ABI, and pg_guard macro generates an error for functions that do not use the C-unwind ABI.
  • pgrx::lwlock: the parameter name of PgLwLock::new is required; PgLwLock::from_named is removed; the type of the parameter value of PgLwLock::attach is changed.
  • pgrx::atomic: the parameter name of PgAtomic::new is required.
  • pgrx::pg_sys: ABI of all generated binding function types has been changed from C to C-unwind.
  • pgrx-tests: on Linux, before using cargo-pgrx with --runas, you must relax kernel security restrictions by running sudo sysctl fs.protected_fifos=0 due to internal implementation details.

Bug Fixes

API Changes (likely breaking)

This PR actually adds a hand-rolled representation for Postgres' pg_sys::TransactionId type. As such, usages of pg_sys::TransactionId may need adjustments. If we missed any UX for the type, please file issues (or PRs!) and we'll address them immediately. A benefit of this is that it's now possible to use pg_sys::TransactionId as arguments or the return type of #[pg_extern] functions.

New Features

More Headers

Code Cleanups

A special thanks to @​nyurik for this one. It was a lot of work and should make clippy users a lot happier!

Administrative/CI

Thank You!

I just want to send a sincere thank you to all the contributors for this release. It represents a lot of work and I'm sure they hope y'all enjoy it and can make good use of it!

New Contributors

Full Changelog: pgcentralfoundation/pgrx@v0.13.1...v0.14.0

v0.13.1

Compare Source

Welcome to pgrx v0.13.1. This is a minor bugfix and non-breaking feature release.

As always, install the new cargo-pgrx CLI tool with cargo install cargo-pgrx --version 0.13.1 --locked and then run cargo pgrx upgrade in your extension creates.

What's Changed

Bug Fixes

The underlying bug here would only expose itself with OID values, which are generated by Postgres, larger than an i32::MAX. As such, it's taken a few years for someone to run into this in the wild!

New Postgres Headers

Improved SQL Type Handling

Code Cleanup/Future Proofing

New cargo-pgrx run Option

Running cargo pgrx run --install-only will do exactly that -- only install the extension in the pgrx-managed Postgres instance. Note that it will also stop the Postgres instance if it's running, but it will not restart it.

New Contributors

Thanks to our new contributors! It's nice to see people scratching their own itches!!

Full Changelog: pgcentralfoundation/pgrx@v0.13.0...v0.13.1

v0.13.0

Compare Source

Welcome to pgrx v0.13.0. The first update in a little bit, which makes pgrx current with upstream dependencies, rust 1.85.0 (but not 2024 Edition, yet), and a slew of fixes and cleanups and community contributions.

Upgrading

You'll need to cargo install cargo-pgrx --version 0.13.0 --locked to get the latest cargo-pgrx tool, and then you can run cargo pgrx upgrade in your extension crates to update their dependencies.

Breaking Changes

Generally, the only breaking changes in v0.13.0 are related to the user-facing SPI APIs. In general, SPI functions that previously took a Vec of Arguments now take a &[DatumWithOid], with proper lifetime bounds. This is a fairly straightforward boilerplate to update.

@​YohDeadfall has done a lot of work on improving SPI's safety and it's greatly appreciated!

What's Changed

cargo-pgrx

Build System

SPI

General pgrx-pg-sys Interfaces

Bug Fixes

Overall Code Cleanup

Thanks!

Thanks to the community, past, present, and future. Especially to our new contributors...

New Contributors

Full Changelog: pgcentralfoundation/pgrx@v0.12.7...v0.13.0

v0.12.9

Compare Source

This is pgrx v0.12.9. This version will refuse to build against Postgres versions 17.1, 16.5, 15.9, 14.14, 13.17, and 12.21. These Postgres versions introduced an ABI incompatibility that we'd rather just not ever have to deal with.

As always, to upgrade please run cargo install cargo-pgrx --version v0.12.9 --locked.

You may need to run another cargo pgrx init to pickup the new latest versions of each major release.

What's Changed

Full Changelog: pgcentralfoundation/pgrx@v0.12.8...v0.12.9

v0.12.8

Compare Source

This is pgrx v0.12.8. It fixes a potential deadlock during the cargo-pgrx "install" process if any of the extension schema files include the @GIT_HASH@ variable. How bizarre!

As always, to upgrade please run cargo install cargo-pgrx --version v0.12.8 --locked.

What's Changed

Full Changelog

v0.12.7

Compare Source

Welcome to pgrx v0.12.7. This is a minor release which adds a few more Postgres headers, fixes a possible crashing bug, adds some more smarts to #[pg_cast], and adds a new GucFlags variant.

To upgrade, please execute cargo install cargo-pgrx --version 0.12.7 --locked. Then you can run cargo pgrx upgrade against your extension crates.

The plan is that this will be the last release in the v0.12.x series.

What's Changed

More Headers

New Features

Less Build Drama

Safety

New Contributors

Full Changelog:


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/pgrx-0.x branch from 3c3445d to 6b4d2d1 Compare April 12, 2025 18:49
@renovate renovate bot changed the title Update Rust crate pgrx to 0.13.0 Update Rust crate pgrx to 0.14.0 Apr 12, 2025
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.

0 participants