| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Maciek Sakrejda <maciek(at)pganalyze(dot)com> |
| Cc: | Andrei Klychkov <andrew(dot)a(dot)klychkov(at)gmail(dot)com>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Fix ALTER SYSTEM empty string bug for GUC_LIST_QUOTE parameters |
| Date: | 2025-11-04 18:59:55 |
| Message-ID: | 656663.1762282795@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Maciek Sakrejda <maciek(at)pganalyze(dot)com> writes:
> On Tue, Nov 4, 2025 at 8:58 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Álvaro Herrera | 2025-11-04 19:26:48 | Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement |
| Previous Message | Masahiko Sawada | 2025-11-04 18:57:14 | Re: psql: tab-completion support for COPY ... TO/FROM STDIN, STDOUT, and PROGRAM |