github pgcentralfoundation/pgrx v0.14.0

latest release: v0.14.1
5 days ago

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.

  • fix cargo-pgrx and pgrx-tests on Windows by @usamoi in #1934
  • tell C compiler to put code and data in separate sections by @usamoi in #2006
  • force using extern "C-unwind" for functions marked with #[pg_guard] by @usamoi in #2014

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: v0.13.1...v0.14.0

Don't miss a new pgrx release

NewReleases is sending notifications on new releases.