Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters
Дата
Msg-id 656663.1762282795@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters  (Maciek Sakrejda <maciek@pganalyze.com>)
Список pgsql-hackers
Maciek Sakrejda <maciek@pganalyze.com> writes:
> On Tue, Nov 4, 2025 at 8:58 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If you are feeling excited about that specific case, I think the
>> correct solution would be to install a GUC check_hook for
>> shared_preload_libraries (and probably its siblings too).

> For what it's worth, there was a patch that took a stab at this a
> while ago, but it ended up RWF:
> https://www.postgresql.org/message-id/flat/Z1kfMUoZkl9P0egB%40paquier.xyz#4a73293daf92aefbbdb43adc9688f082
> I was a reviewer and I still think something like that would be useful
> and prevent a lot of mistakes.

Hah, yeah, I thought that idea seemed familiar.

Re-reading that thread, it seems like a whole lot of the difficulties
arose precisely from not wanting to make the check_hook's complaints
be hard errors.  Maybe we should abandon the idea that we need to
permit setting the GUC to a value that we know will not work.  It was
argued that there were use-cases for that, but the argument seems
rather thin and not worth tying the behavior in knots for.

Another idea, considering our experience with search_path and
temp_tablespaces, is maybe it shouldn't be a hard error if the
GUC contains references to nonexistent libraries, only if the
syntax is bad.  As long as an empty-string item is bad syntax,
the check_hook could still prevent the problem we started this
thread with.

            regards, tom lane



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