| From: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
|---|---|
| To: | 'Jacob Champion' <jacob(dot)champion(at)enterprisedb(dot)com> |
| Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | RE: [PATCH] Add a check_hook for output_plugin_libraries |
| Date: | 2026-09-24 06:41:22 |
| Message-ID: | TY5PR01MB183143C378F331907C902AE5FF5812@TY5PR01MB18314.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Dear Jacob,
> Fujii-san noted in [1] that the new output_plugin_libraries GUC
> doesn't have its syntax validated until it's actually used. This is
> only a problem if a DBA/superuser makes a mistake, but it would be
> really annoying for them to hit it, and it contradicts an assumption I
> made inside the new pg_upgrade check. Attached is a patch to fix that.
Thank for the patch. I found that ALTER DATABASE SET command can
cause the inconsistent state. Reproducer:
```
postgres=# SHOW output_plugin_libraries ;
output_plugin_libraries
---------------------------
"pgoutput, test_decoding"
(1 row)
postgres=# ALTER DATABASE postgres SET output_plugin_libraries TO 'pgoutput, ';
ALTER DATABASE
postgres=# \c postgres
You are now connected to database "postgres" as user "postgres".
postgres=# SHOW output_plugin_libraries ;
output_plugin_libraries
-------------------------
"pgoutput, "
(1 row)
```
Per my experiments and analysis, flatten_set_variable_args() added a double-quote
at the begining and the end. Then the check-hook calls SplitGUCList(), but it
seems to regard the quoted string as a chunk.
Do you think this should be fixed? If so SplitGUCList may not be enough, but it
may lead additional policy for the plugin name. E.g., plugin should not contain
"," in the name.
> For PG20 onwards, I think it'd be really nice to enforce that all
> GUC_LIST_QUOTE variables must at least pass SplitGUCList() validation
> if they don't provide their own explicit check_hook. We have other
> code and comments implying that clients don't have to worry about this
> case; an example is in [2].
Sounds better, but it may have a same issue as above.
Best regards,
Hayato Kuroda
FUJITSU LIMITED
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeevan Chalke | 2026-09-24 07:38:51 | Re: Add PRODUCT() aggregate function |
| Previous Message | Michael Paquier | 2026-09-24 06:12:06 | Re: ZSTD TOAST compression, and an extensible compression method encoding |