Re: Possibility to disable `ALTER SYSTEM`

Поиск
Список
Период
Сортировка
От Gabriele Bartolini
Тема Re: Possibility to disable `ALTER SYSTEM`
Дата
Msg-id CA+VUV5oyC=mggqMOKNXP6+SkQFO5vNr0Wi9nmMnzTNYcgVReng@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Possibility to disable `ALTER SYSTEM`  ("Joel Jacobson" <joel@compiler.org>)
Ответы Re: Possibility to disable `ALTER SYSTEM`  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Hi Joel,

On Wed, 7 Feb 2024 at 10:00, Joel Jacobson <joel@compiler.org> wrote:
On Fri, Sep 8, 2023, at 16:17, Gabriele Bartolini wrote:
> ```
> postgres=# ALTER SYSTEM SET wal_level TO minimal;
> ERROR:  could not open file "postgresql.auto.conf": Permission denied
> ```

+1 to simply mark postgresql.auto.conf file as not being writeable.

To improve the UX experience, how about first checking if the file is not writeable, or catch EACCESS, and add a user-friendly hint?

```
postgres=# ALTER SYSTEM SET wal_level TO minimal;
ERROR:  could not open file "postgresql.auto.conf": Permission denied
HINT: The ALTER SYSTEM command is effectively disabled as the configuration file is set to read-only.
```

This would do - provided we fix the issue with pg_rewind not handling read-only files in PGDATA.

Cheers,
Gabriele
--
Gabriele Bartolini
Vice President, Cloud Native at EDB

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: pgsql: Add EXPLAIN (MEMORY) to report planner memory consumption