github pgcentralfoundation/pgrx v0.5.3

latest releases: v0.11.4, v0.12.0-alpha.1, v0.12.0-alpha.0...
20 months ago

What was presumed to be a no-op change after testing on multiple operating systems nonetheless broke the build on Red Hat distros. We're looking into adding another distro (presumably one that is fond of fedoras?) in our CI just to prevent this from happening again and allow us to better anticipate repackages of Postgres with a nonzero number of quirks. This release primarily is to fix that by removing allowlist_* from our bindgen invocation for now, thanks to @BradyBonnette in #760.

It also fixes a use-after-free that PGX was inducing in Postgres: Datum arguments were being unboxed (into... new boxes, usually) during set-returning functions, but not using the multi-call memory context. This was fixed thanks to @eeeebbbbrrrr in #784

However, it does have a number of other changes.

Less unnecessary dynamic linkage

Some of the dynamic linkage PGX was asking for was largely unnecessary. In new PGX projects, you should now be able to use exotic linkers which don't accept various command line arguments other linkers do... on Linux, as the dynamic lookup argument remains necessary on MacOS (for now), thanks to "Only specify -undefined dynamic_lookup on macOS" by @thomcc in #754
To get this benefit in an existing project, replace the existing [build] key in your ./.cargo/config{,.toml} with

[target.'cfg(target_os="macos")']
# Postgres symbols won't be available until runtime
rustflags = ["-Clink-arg=-Wl,-undefined,dynamic_lookup"]

cargo-pgx improvements

cargo pgx init now accepts the flags --base-port and --base-testing-port, thanks to "Problem: working with independent extensions simultaneously" by @yrashk in #765. These values can be later changed in $PGX_HOME/config.toml. This is intended to make it easier to work with multiple extensions at once.

We now support --profile <profile name> in cargo-pgx thanks to @thomcc in #758, to allow you to better tune the testing and packaging profiles you may want to use.

New pg_sys bindings

  • Enable low-level access to the database catalog by @yrashk in #709
  • Added includes for "storage/spin.h" by @osawyerr in #775

Other minor fixups

  • We've stopped distorting the signatures of variadic functions thanks to @thomcc in #757
  • The --bgworker template was found to have fallen out of sync and was patched by @workingjubilee in #768
  • Remove lifetimes from FunctionMetadata impl by @thomcc in #772
  • derive Debug for PgLogLevel and PgSqlErrorCode by @yrashk in #786
  • Make syntect an optional dependency, only used by cargo-pgx by @thomcc in #755
  • Avoid some dependencies in pgx-pg-sys by @thomcc in #756

New Contributors

Full Changelog: v0.5.2...v0.5.3

Don't miss a new pgrx release

NewReleases is sending notifications on new releases.