Skip to content

Commit 2e515ae

Browse files
authored
Update version to 0.16.1 (#2145)
Welcome to pgrx v0.16.1. This is a relatively minor release but does add support for Postgres v18, released on September 25, 2025. As always, install/update `cargo-pgrx` with `cargo install cargo-pgrx --version 0.16.1 --locked`. Then run `cargo pgrx update` in all your extension crates. To pick up Postgres v18, you'll need to run (at least) `cargo pgrx init` and then add the `pg18` feature flag to your extension's `Cargo.toml`. ## What's Changed * remove polyfill crates by @usamoi in #2128 * Example : register PostgreSQL hooks by @daamien in #2125 * add more WAL/replication headers by @eeeebbbbrrrr in #2130 * remove home, supports-color 0.2 and update toml, color-eyre by @usamoi in #2133 * cargo-pgrx: fix pg_regress path inconsistency by @charmitro in #2137 * fix big endian by @usamoi in #2132 * Fixing CI by @eeeebbbbrrrr in #2143 * pg18 support by @eeeebbbbrrrr in #2144 **Full Changelog**: v0.16.0...v0.16.1
1 parent 25026b6 commit 2e515ae

File tree

18 files changed

+1671
-730
lines changed

18 files changed

+1671
-730
lines changed

Cargo.lock

Lines changed: 678 additions & 646 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ version = "0.16.0"
6666
cargo-pgrx = { path = "cargo-pgrx" }
6767

6868
[workspace.dependencies]
69-
pgrx-macros = { path = "./pgrx-macros", version = "=0.16.0" }
70-
pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.16.0" }
71-
pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.16.0" }
72-
pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.16.0" }
73-
pgrx-bindgen = { path = "./pgrx-bindgen", version = "=0.16.0" }
69+
pgrx-macros = { path = "./pgrx-macros", version = "=0.16.1" }
70+
pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.16.1" }
71+
pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.16.1" }
72+
pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.16.1" }
73+
pgrx-bindgen = { path = "./pgrx-bindgen", version = "=0.16.1" }
7474

7575
cargo_metadata = "0.18.0"
7676
cargo-edit = "=0.13.2" # format-preserving edits to cargo.toml

cargo-pgrx/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[package]
1212
name = "cargo-pgrx"
13-
version = "0.16.0"
13+
version = "0.16.1"
1414
authors.workspace = true
1515
license.workspace = true
1616
description = "Cargo subcommand for 'pgrx' to make Postgres extension development easy"

cargo-pgrx/src/templates/cargo_toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ pg18 = ["pgrx/pg18", "pgrx-tests/pg18" ]
2121
pg_test = []
2222

2323
[dependencies]
24-
pgrx = "=0.16.0"
24+
pgrx = "=0.16.1"
2525

2626
[dev-dependencies]
27-
pgrx-tests = "=0.16.0"
27+
pgrx-tests = "=0.16.1"
2828

2929
[profile.dev]
3030
panic = "unwind"

pgrx-bindgen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "pgrx-bindgen"
33
description = "additional bindgen support for pgrx"
4-
version = "0.16.0"
4+
version = "0.16.1"
55
edition.workspace = true
66
license.workspace = true
77
homepage = "https://github.com/pgcentralfoundation/pgrx"

pgrx-examples/hooks/Cargo.toml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1+
#LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
2+
#LICENSE
3+
#LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
4+
#LICENSE
5+
#LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <[email protected]>
6+
#LICENSE
7+
#LICENSE All rights reserved.
8+
#LICENSE
9+
#LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.
10+
111
[package]
212
name = "hooks"
313
version = "0.0.0"
414
edition = "2021"
15+
publish = false
516

617
[lib]
718
crate-type = ["cdylib", "lib"]
@@ -21,16 +32,17 @@ pg18 = ["pgrx/pg18", "pgrx-tests/pg18" ]
2132
pg_test = []
2233

2334
[dependencies]
24-
pgrx = "=0.16.0"
35+
pgrx = { path = "../../pgrx", default-features = false }
2536

2637
[dev-dependencies]
27-
pgrx-tests = "=0.16.0"
38+
pgrx-tests = { path = "../../pgrx-tests" }
2839

29-
[profile.dev]
30-
panic = "unwind"
40+
# uncomment these if compiling outside of 'pgrx'
41+
# [profile.dev]
42+
# panic = "unwind"
3143

32-
[profile.release]
33-
panic = "unwind"
34-
opt-level = 3
35-
lto = "fat"
36-
codegen-units = 1
44+
# [profile.release]
45+
# panic = "unwind"
46+
# opt-level = 3
47+
# lto = "fat"
48+
# codegen-units = 1

pgrx-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[package]
1212
name = "pgrx-macros"
13-
version = "0.16.0"
13+
version = "0.16.1"
1414
authors.workspace = true
1515
license.workspace = true
1616
description = "Proc Macros for 'pgrx'"

pgrx-pg-config/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[package]
1212
name = "pgrx-pg-config"
13-
version = "0.16.0"
13+
version = "0.16.1"
1414
authors.workspace = true
1515
license.workspace = true
1616
description = "A Postgres pg_config wrapper for 'pgrx'"

pgrx-pg-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[package]
1212
name = "pgrx-pg-sys"
13-
version = "0.16.0"
13+
version = "0.16.1"
1414
authors.workspace = true
1515
license.workspace = true
1616
description = "Generated Rust bindings for Postgres internals, for use with 'pgrx'"

pgrx-pg-sys/src/include/pg13.rs

Lines changed: 155 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,18 @@ pub const MAXIMUM_ALIGNOF: u32 = 8;
183183
pub const MEMSET_LOOP_LIMIT: u32 = 1024;
184184
pub const PACKAGE_BUGREPORT: &::core::ffi::CStr = c"[email protected]";
185185
pub const PACKAGE_NAME: &::core::ffi::CStr = c"PostgreSQL";
186-
pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 13.21";
186+
pub const PACKAGE_STRING: &::core::ffi::CStr = c"PostgreSQL 13.22";
187187
pub const PACKAGE_TARNAME: &::core::ffi::CStr = c"postgresql";
188188
pub const PACKAGE_URL: &::core::ffi::CStr = c"https://www.postgresql.org/";
189-
pub const PACKAGE_VERSION: &::core::ffi::CStr = c"13.21";
189+
pub const PACKAGE_VERSION: &::core::ffi::CStr = c"13.22";
190190
pub const PG_KRB_SRVNAM: &::core::ffi::CStr = c"postgres";
191191
pub const PG_MAJORVERSION: &::core::ffi::CStr = c"13";
192192
pub const PG_MAJORVERSION_NUM: u32 = 13;
193-
pub const PG_MINORVERSION_NUM: u32 = 21;
193+
pub const PG_MINORVERSION_NUM: u32 = 22;
194194
pub const PG_USE_STDBOOL: u32 = 1;
195-
pub const PG_VERSION: &::core::ffi::CStr = c"13.21";
196-
pub const PG_VERSION_NUM: u32 = 130021;
197-
pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 13.21 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit" ;
195+
pub const PG_VERSION: &::core::ffi::CStr = c"13.22";
196+
pub const PG_VERSION_NUM: u32 = 130022;
197+
pub const PG_VERSION_STR : & :: core :: ffi :: CStr = c"PostgreSQL 13.22 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0, 64-bit" ;
198198
pub const RELSEG_SIZE: u32 = 131072;
199199
pub const SIZEOF_BOOL: u32 = 1;
200200
pub const SIZEOF_LONG: u32 = 8;
@@ -255,7 +255,7 @@ pub const PG_BINARY_A: &::core::ffi::CStr = c"a";
255255
pub const PG_BINARY_R: &::core::ffi::CStr = c"r";
256256
pub const PG_BINARY_W: &::core::ffi::CStr = c"w";
257257
pub const PGINVALID_SOCKET: i32 = -1;
258-
pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 13.21\n";
258+
pub const PG_BACKEND_VERSIONSTR: &::core::ffi::CStr = c"postgres (PostgreSQL) 13.22\n";
259259
pub const EXE: &::core::ffi::CStr = c"";
260260
pub const DEVNULL: &::core::ffi::CStr = c"/dev/null";
261261
pub const USE_REPL_SNPRINTF: u32 = 1;
@@ -2311,6 +2311,19 @@ pub const LOG_METAINFO_DATAFILE_TMP: &::core::ffi::CStr = c"current_logfiles.tmp
23112311
pub const RBTXN_HAS_CATALOG_CHANGES: u32 = 1;
23122312
pub const RBTXN_IS_SUBXACT: u32 = 2;
23132313
pub const RBTXN_IS_SERIALIZED: u32 = 4;
2314+
pub const RBTXN_DISTR_INVAL_OVERFLOWED: u32 = 8;
2315+
pub const SYNC_REP_NO_WAIT: i32 = -1;
2316+
pub const SYNC_REP_WAIT_WRITE: u32 = 0;
2317+
pub const SYNC_REP_WAIT_FLUSH: u32 = 1;
2318+
pub const SYNC_REP_WAIT_APPLY: u32 = 2;
2319+
pub const NUM_SYNC_REP_WAIT_MODE: u32 = 3;
2320+
pub const SYNC_REP_NOT_WAITING: u32 = 0;
2321+
pub const SYNC_REP_WAITING: u32 = 1;
2322+
pub const SYNC_REP_WAIT_COMPLETE: u32 = 2;
2323+
pub const SYNC_REP_PRIORITY: u32 = 0;
2324+
pub const SYNC_REP_QUORUM: u32 = 1;
2325+
pub const SYNC_STANDBY_INIT: u32 = 1;
2326+
pub const SYNC_STANDBY_DEFINED: u32 = 2;
23142327
pub const STATS_MAX_DIMENSIONS: u32 = 8;
23152328
pub const STATS_NDISTINCT_MAGIC: u32 = 2740109220;
23162329
pub const STATS_NDISTINCT_TYPE_BASIC: u32 = 1;
@@ -27108,6 +27121,8 @@ pub struct ReorderBufferTXN {
2710827121
pub invalidations: *mut SharedInvalidationMessage,
2710927122
pub node: dlist_node,
2711027123
pub size: Size,
27124+
pub ninvalidations_distributed: uint32,
27125+
pub invalidations_distributed: *mut SharedInvalidationMessage,
2711127126
}
2711227127
impl Default for ReorderBufferTXN {
2711327128
fn default() -> Self {
@@ -27399,6 +27414,78 @@ impl Default for LogicalDecodingContext {
2739927414
}
2740027415
}
2740127416
#[repr(C)]
27417+
#[derive(Debug, Default, Copy, Clone)]
27418+
pub struct SyncRepStandbyData {
27419+
pub pid: pid_t,
27420+
pub write: XLogRecPtr,
27421+
pub flush: XLogRecPtr,
27422+
pub apply: XLogRecPtr,
27423+
pub sync_standby_priority: ::core::ffi::c_int,
27424+
pub walsnd_index: ::core::ffi::c_int,
27425+
pub is_me: bool,
27426+
}
27427+
#[repr(C)]
27428+
#[derive(Debug, Default)]
27429+
pub struct SyncRepConfigData {
27430+
pub config_size: ::core::ffi::c_int,
27431+
pub num_sync: ::core::ffi::c_int,
27432+
pub syncrep_method: uint8,
27433+
pub nmembers: ::core::ffi::c_int,
27434+
pub member_names: __IncompleteArrayField<::core::ffi::c_char>,
27435+
}
27436+
pub mod WalSndState {
27437+
pub type Type = ::core::ffi::c_uint;
27438+
pub const WALSNDSTATE_STARTUP: Type = 0;
27439+
pub const WALSNDSTATE_BACKUP: Type = 1;
27440+
pub const WALSNDSTATE_CATCHUP: Type = 2;
27441+
pub const WALSNDSTATE_STREAMING: Type = 3;
27442+
pub const WALSNDSTATE_STOPPING: Type = 4;
27443+
}
27444+
#[repr(C)]
27445+
#[derive(Debug, Copy, Clone)]
27446+
pub struct WalSnd {
27447+
pub pid: pid_t,
27448+
pub state: WalSndState::Type,
27449+
pub sentPtr: XLogRecPtr,
27450+
pub needreload: bool,
27451+
pub write: XLogRecPtr,
27452+
pub flush: XLogRecPtr,
27453+
pub apply: XLogRecPtr,
27454+
pub writeLag: TimeOffset,
27455+
pub flushLag: TimeOffset,
27456+
pub applyLag: TimeOffset,
27457+
pub sync_standby_priority: ::core::ffi::c_int,
27458+
pub mutex: slock_t,
27459+
pub latch: *mut Latch,
27460+
pub replyTime: TimestampTz,
27461+
}
27462+
impl Default for WalSnd {
27463+
fn default() -> Self {
27464+
let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
27465+
unsafe {
27466+
::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
27467+
s.assume_init()
27468+
}
27469+
}
27470+
}
27471+
#[repr(C)]
27472+
#[derive(Debug)]
27473+
pub struct WalSndCtlData {
27474+
pub SyncRepQueue: [SHM_QUEUE; 3usize],
27475+
pub lsn: [XLogRecPtr; 3usize],
27476+
pub sync_standbys_status: bits8,
27477+
pub walsnds: __IncompleteArrayField<WalSnd>,
27478+
}
27479+
impl Default for WalSndCtlData {
27480+
fn default() -> Self {
27481+
let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
27482+
unsafe {
27483+
::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
27484+
s.assume_init()
27485+
}
27486+
}
27487+
}
27488+
#[repr(C)]
2740227489
#[derive(Debug, Copy, Clone)]
2740327490
pub struct RowSecurityPolicy {
2740427491
pub policy_name: *mut ::core::ffi::c_char,
@@ -31422,6 +31509,7 @@ unsafe extern "C-unwind" {
3142231509
pub fn standard_ExecutorEnd(queryDesc: *mut QueryDesc);
3142331510
pub fn ExecutorRewind(queryDesc: *mut QueryDesc);
3142431511
pub fn ExecCheckRTPerms(rangeTable: *mut List, ereport_on_violation: bool) -> bool;
31512+
pub fn ExecCheckRTEPerms(rte: *mut RangeTblEntry) -> bool;
3142531513
pub fn CheckValidResultRel(resultRelInfo: *mut ResultRelInfo, operation: CmdType::Type);
3142631514
pub fn InitResultRelInfo(
3142731515
resultRelInfo: *mut ResultRelInfo,
@@ -38738,6 +38826,7 @@ unsafe extern "C-unwind" {
3873838826
);
3873938827
pub fn get_function_rows(root: *mut PlannerInfo, funcid: Oid, node: *mut Node) -> f64;
3874038828
pub fn has_row_triggers(root: *mut PlannerInfo, rti: Index, event: CmdType::Type) -> bool;
38829+
pub fn has_transition_tables(root: *mut PlannerInfo, rti: Index, event: CmdType::Type) -> bool;
3874138830
pub fn has_stored_generated_columns(root: *mut PlannerInfo, rti: Index) -> bool;
3874238831
pub fn get_dependent_generated_columns(
3874338832
root: *mut PlannerInfo,
@@ -39969,6 +40058,13 @@ unsafe extern "C-unwind" {
3996940058
nmsgs: Size,
3997040059
msgs: *mut SharedInvalidationMessage,
3997140060
);
40061+
pub fn ReorderBufferAddDistributedInvalidations(
40062+
rb: *mut ReorderBuffer,
40063+
xid: TransactionId,
40064+
lsn: XLogRecPtr,
40065+
nmsgs: Size,
40066+
msgs: *mut SharedInvalidationMessage,
40067+
);
3997240068
pub fn ReorderBufferImmediateInvalidation(
3997340069
arg1: *mut ReorderBuffer,
3997440070
ninvalidations: uint32,
@@ -40064,6 +40160,43 @@ unsafe extern "C-unwind" {
4006440160
) -> bool;
4006540161
pub fn ApplyWorkerMain(main_arg: Datum);
4006640162
pub fn IsLogicalWorker() -> bool;
40163+
pub static mut SyncRepConfig: *mut SyncRepConfigData;
40164+
pub static mut syncrep_parse_result: *mut SyncRepConfigData;
40165+
pub static mut syncrep_parse_error_msg: *mut ::core::ffi::c_char;
40166+
pub static mut SyncRepStandbyNames: *mut ::core::ffi::c_char;
40167+
pub fn SyncRepWaitForLSN(lsn: XLogRecPtr, commit: bool);
40168+
pub fn SyncRepCleanupAtProcExit();
40169+
pub fn SyncRepInitConfig();
40170+
pub fn SyncRepReleaseWaiters();
40171+
pub fn SyncRepGetCandidateStandbys(
40172+
standbys: *mut *mut SyncRepStandbyData,
40173+
) -> ::core::ffi::c_int;
40174+
pub fn SyncRepUpdateSyncStandbysDefined();
40175+
pub fn check_synchronous_standby_names(
40176+
newval: *mut *mut ::core::ffi::c_char,
40177+
extra: *mut *mut ::core::ffi::c_void,
40178+
source: GucSource::Type,
40179+
) -> bool;
40180+
pub fn assign_synchronous_standby_names(
40181+
newval: *const ::core::ffi::c_char,
40182+
extra: *mut ::core::ffi::c_void,
40183+
);
40184+
pub fn assign_synchronous_commit(newval: ::core::ffi::c_int, extra: *mut ::core::ffi::c_void);
40185+
pub fn syncrep_yyparse() -> ::core::ffi::c_int;
40186+
pub fn syncrep_yylex() -> ::core::ffi::c_int;
40187+
pub fn syncrep_yyerror(str_: *const ::core::ffi::c_char);
40188+
pub fn syncrep_scanner_init(query_string: *const ::core::ffi::c_char);
40189+
pub fn syncrep_scanner_finish();
40190+
pub static mut MyWalSnd: *mut WalSnd;
40191+
pub static mut WalSndCtl: *mut WalSndCtlData;
40192+
pub fn WalSndSetState(state: WalSndState::Type);
40193+
pub fn replication_yyparse() -> ::core::ffi::c_int;
40194+
pub fn replication_yylex() -> ::core::ffi::c_int;
40195+
pub fn replication_yyerror(str_: *const ::core::ffi::c_char) -> !;
40196+
pub fn replication_scanner_init(query_string: *const ::core::ffi::c_char);
40197+
pub fn replication_scanner_finish();
40198+
pub fn replication_scanner_is_replication_command() -> bool;
40199+
pub static mut replication_parse_result: *mut Node;
4006740200
pub fn QueryRewrite(parsetree: *mut Query) -> *mut List;
4006840201
pub fn AcquireRewriteLocks(parsetree: *mut Query, forExecute: bool, forUpdatePushedDown: bool);
4006940202
pub fn build_column_default(rel: Relation, attrno: ::core::ffi::c_int) -> *mut Node;
@@ -43956,6 +44089,11 @@ unsafe extern "C-unwind" {
4395644089
varRelid: ::core::ffi::c_int,
4395744090
vardata: *mut VariableStatData,
4395844091
);
44092+
pub fn all_rows_selectable(
44093+
root: *mut PlannerInfo,
44094+
varno: Index,
44095+
varattnos: *mut Bitmapset,
44096+
) -> bool;
4395944097
pub fn statistic_proc_security_check(vardata: *mut VariableStatData, func_oid: Oid) -> bool;
4396044098
pub fn get_restriction_variable(
4396144099
root: *mut PlannerInfo,
@@ -48528,6 +48666,16 @@ pub const WalLevel_WAL_LEVEL_MINIMAL: u32 = 0;
4852848666
pub const WalLevel_WAL_LEVEL_REPLICA: u32 = 1;
4852948667
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalLevel::WAL_LEVEL_LOGICAL")]
4853048668
pub const WalLevel_WAL_LEVEL_LOGICAL: u32 = 2;
48669+
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalSndState::WALSNDSTATE_STARTUP")]
48670+
pub const WalSndState_WALSNDSTATE_STARTUP: u32 = 0;
48671+
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalSndState::WALSNDSTATE_BACKUP")]
48672+
pub const WalSndState_WALSNDSTATE_BACKUP: u32 = 1;
48673+
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalSndState::WALSNDSTATE_CATCHUP")]
48674+
pub const WalSndState_WALSNDSTATE_CATCHUP: u32 = 2;
48675+
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalSndState::WALSNDSTATE_STREAMING")]
48676+
pub const WalSndState_WALSNDSTATE_STREAMING: u32 = 3;
48677+
#[deprecated(since = "0.12.0", note = "you want pg_sys::WalSndState::WALSNDSTATE_STOPPING")]
48678+
pub const WalSndState_WALSNDSTATE_STOPPING: u32 = 4;
4853148679
#[deprecated(since = "0.12.0", note = "you want pg_sys::XLTW_Oper::XLTW_None")]
4853248680
pub const XLTW_Oper_XLTW_None: u32 = 0;
4853348681
#[deprecated(since = "0.12.0", note = "you want pg_sys::XLTW_Oper::XLTW_Update")]

0 commit comments

Comments
 (0)