> On Sep 24, 2026, at 17:35, Michael Banck <mbanck@gmx.net> wrote:
>
> Hi,
>
> On Thu, Sep 24, 2026 at 03:39:22PM +0800, Chao Li wrote:
>> Is there a reason ALTER SYSTEM RELOAD needs stronger privileges than
>> pg_reload_conf()?
>
> Well, it is clear that you won't be able to GRANT this on a SQL-level.
>
> But what could be done is add the pg_maintain (or something similar)
> default role as an allowed user for running this command besides
> Superuser.
>
>
> Michael
Yeah, that could be a solution. But the current patch only allows super user:
```
+/*
+ * Execute ALTER SYSTEM RELOAD.
+ */
+void
+AlterSystemReloadConfig(void)
+{
+ if (!AllowAlterSystem)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("ALTER SYSTEM is not allowed in this environment")));
+
+ if (!superuser())
+ ereport(ERROR,
+ (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
+ errmsg("permission denied to perform ALTER SYSTEM RELOAD")));
+
+ if (kill(PostmasterPid, SIGHUP))
+ ereport(ERROR,
+ (errmsg("failed to send signal to postmaster: %m")));
+}
```
That’s what I got the concern.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/