Re: [PATCH] Add ALTER SYSTEM RELOAD

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Yuhang Qiu <iamqyh(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add ALTER SYSTEM RELOAD
Date: 2026-09-28 23:03:43
Message-ID: 6ba07f06-28f6-461b-a7b6-05ed4b99bd91@proxel.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/24/26 9:29 PM, Tom Lane wrote:
> Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> writes:
>>> On Sep 23, 2026, at 17:44, Yuhang Qiu <iamqyh(at)gmail(dot)com> wrote:
>>> For configuration parameters that can be reloaded, administrators often need
>>> to perform two steps in succession:
>>> ```sql
>>> ALTER SYSTEM SET work_mem = '64MB';
>>> SELECT pg_reload_conf();
>>> ```
>>>
>>> I propose adding `ALTER SYSTEM RELOAD`, so the sequence can be written as:
>>> ```sql
>>> ALTER SYSTEM SET work_mem = '64MB';
>>> ALTER SYSTEM RELOAD;
>>> ```
>
>> Thanks for the patch. After reading it, I have a concern. pg_reload_conf() relies on normal function privileges, so a super user can grant EXECUTE on it to a non-superuser. With this patch, the two interfaces for doing essentially the same thing would have different privilege models:
>
> I'm pretty down on this proposal even without the privilege question.
> "There's more than one way to do it" isn't a great thing for
> security-relevant operations, and this surely is one.

+1

I do not see how this adds anything worth the increased maintenance
burden. How to reload the config is clearly discoverable in the docs for
ALTER SYSTEM.

Andreas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabrízio Mello 2026-09-28 23:20:56 Add pg_stat_log_messages: cumulative statistics about server log messages (was: Add contrib module pg_stat_log: cumulative statistics about server log messages)
Previous Message Zsolt Parragi 2026-09-28 23:02:26 Re: [PATCH v1] Fix for Bug#19724 - ALTER TYPE ... ALTER ATTRIBUTE triggers internal error for base type of domain with check