From 4bee20d3ce857899970287ab39a68d604dd9d98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ko=C5=82odziejczak?= Date: Wed, 9 Oct 2024 19:29:42 +0200 Subject: [PATCH] docs: align GucContext::SuBackend and GucContext::Backend with original PostgreSQL description Current GucContext::Backend description applies to GucContext::SuBackend. ref https://doxygen.postgresql.org/guc_8h_source.html#l00053 > * BACKEND and SU_BACKEND options can only be set at postmaster startup, > * from the configuration file, or by client request in the connection > * startup packet (e.g., from libpq's PGOPTIONS variable). SU_BACKEND > * options can be set from the startup packet only when the user is a > * superuser. Furthermore, an already-started backend will ignore changes > * to such an option in the configuration file. The idea is that these > * options are fixed for a given backend once it's started, but they can > * vary across backends. --- pgrx/src/guc.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pgrx/src/guc.rs b/pgrx/src/guc.rs index 4617a2b0f..e25fc62da 100644 --- a/pgrx/src/guc.rs +++ b/pgrx/src/guc.rs @@ -32,16 +32,18 @@ pub enum GucContext { /// file asynchronously.) Sighup = pg_sys::GucContext::PGC_SIGHUP as isize, - /// can only be set at postmaster startup, from the configuration file, or by - /// client request in the connection startup packet (e.g., from libpq's PGOPTIONS - /// variable). + /// can only be set at postmaster startup, from the configuration file, or by client request in + /// the connection startup packet (e.g., from libpq's PGOPTIONS variable), but only when the + /// user is a superuser. Furthermore, an already-started backend will ignore changes to such an + /// option in the configuration file. The idea is that these options are fixed for a given + /// backend once it's started, but they can vary across backends. SuBackend = pg_sys::GucContext::PGC_SU_BACKEND as isize, - /// can be set from the startup packet only when the user is a - /// superuser. Furthermore, an already-started backend will ignore changes - /// to such an option in the configuration file. The idea is that these - /// options are fixed for a given backend once it's started, but they can - /// vary across backends. + /// can only be set at postmaster startup, from the configuration file, or by client request in + /// the connection startup packet (e.g., from libpq's PGOPTIONS variable), by any user. + /// Furthermore, an already-started backend will ignore changes to such an option in the + /// configuration file. The idea is that these options are fixed for a given backend once it's + /// started, but they can vary across backends. Backend = pg_sys::GucContext::PGC_BACKEND as isize, /// can be set at postmaster startup, with the SIGHUP