Re: Possibility to disable `ALTER SYSTEM`

From: Gabriele Bartolini <gabriele(dot)bartolini(at)enterprisedb(dot)com>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Martín Marqués <martin(dot)marques(at)gmail(dot)com>, Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possibility to disable `ALTER SYSTEM`
Date: 2024-02-07 10:35:14
Message-ID: CA+VUV5qod=Mz7P0Ga3TXB1B7hcF7buNh2ucs7gJr8X1SN1NeBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Jelte,

On Tue, 6 Feb 2024 at 16:22, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> wrote:

> I'm not convinced we need a new file to disable ALTER SYSTEM. I feel
> like an "enable_alter_system" GUC that defaults to ON would work fine
> for this. If we make that GUC be PGC_POSTMASTER then an operator can
> disable ALTER SYSTEM either with a command line argument or by
> changing the main config file. Since this feature is mostly useful
> when the config file is managed by an external system, it seems rather
> simple for that system to configure one extra GUC in the config file.
>

This is mostly the approach I have taken in the patch, except allowing to
change the value in the configuration file. The patch at the moment was
enforcing just the setting at startup (which is more than enough for a
Kubernetes operator given that Postgres runs in the container). I had done
some experiments enabling the change in the configuration file, but wasn't
sure in which `config_group` to place the 'enable_alter_system` GUC, based
on the src/include/utils/guc_tables.h. Any thoughts/hints?

Cheers,
Gabriele
--
Gabriele Bartolini
Vice President, Cloud Native at EDB
enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2024-02-07 10:37:07 Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock
Previous Message Alvaro Herrera 2024-02-07 10:19:29 Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock