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 thecshim
feature in itsCargo.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 theC-unwind
ABI, andpg_guard
macro generates an error for functions that do not use theC-unwind
ABI.pgrx::lwlock
: the parametername
ofPgLwLock::new
is required;PgLwLock::from_named
is removed; the type of the parametervalue
ofPgLwLock::attach
is changed.pgrx::atomic
: the parametername
ofPgAtomic::new
is required.pgrx::pg_sys
: ABI of all generated binding function types has been changed fromC
toC-unwind
.pgrx-tests
: on Linux, before usingcargo-pgrx
with--runas
, you must relax kernel security restrictions by runningsudo sysctl fs.protected_fifos=0
due to internal implementation details.
Bug Fixes
- fix: invalid error info in PgHeapTuple::set_by_index by @silver-ymz in #1998
- Fixed expected message for retinfo check by @YohDeadfall in #2031
API Changes (likely breaking)
DatumWithOid
: Addnew_from_datum(Option<Datum>, Oid)
andnull_oid(Oid)
by @the-kenny in #1999- Implemented
pgstat
macros by @YohDeadfall in #2007 - Implemented
Display
forOid
by @YohDeadfall in #2029 - Added mapping for
xid
by @YohDeadfall in #2003
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.
- Renamed
Oid::as_u32
toto_u32
by @YohDeadfall in #2011
New Features
- Enable cross compiling extensions by @rhelmot in #1994
- feat: add
PgHeapTuple::set_by_index_unchecked
by @silver-ymz in #2012
More Headers
- include
storage/buf_internals.h
by @eeeebbbbrrrr in #2008 - include
tsearch/ts_cache.h
by @silver-ymz in #2010 - include
utils/spccache.h
by @usamoi in #2023 - add partitioning headers by @eeeebbbbrrrr in #2018
Code Cleanups
- Dedup array
IntoDatum
, drop intermediate Vecs fortuples
by @vrmiguel in #2017 - A number of small lints by @nyurik in #2026
A special thanks to @nyurik for this one. It was a lot of work and should make clippy users a lot happier!
Administrative/CI
- Removed support of PostgreSQL 12 by @YohDeadfall in #2028 and #2036
- Fix typo on README.md by @lizardoluis in #1995
- Pinned cargo-edit version by @YohDeadfall in #2004
- Updated cargo-edit by @YohDeadfall in #2005
- Updated Alpine version to 3.21 by @YohDeadfall in #2015
- Instruct
rustfmt
to use--edition 2021
by @eeeebbbbrrrr in #2002 - Fixed typo in gcd docs by @YohDeadfall in #2027
- Fixed docker file for alpine by @YohDeadfall in #2024
- update readme about Windows requirements by @usamoi in #2019
- Search artifacts by manifest path by @YohDeadfall in #2032
- Fixed Discord invitation link by @YohDeadfall in #2033
- cargo-fmt by @eeeebbbbrrrr in #2038
- update dependencies and fix compilation problem on pg13 by @eeeebbbbrrrr in #2039
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
- @lizardoluis made their first contribution in #1995
- @rhelmot made their first contribution in #1994
Full Changelog: v0.13.1...v0.14.0