| From: | Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
|---|---|
| To: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(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-29 18:54:31 |
| Message-ID: | CAOYmi+=Cy2j=-_-VdT1cE_91NRXs9_1hyGTUA8CVpOUSFvOKUA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Sep 24, 2026 at 7:46 PM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
> ```
> + /*
> + * XXX SplitGUCList won't respect guc_malloc requirements, but this is
> + * consistent with other check_hook implementations...
> + */
> ```
>
> Let me clarify: it's because the SplitGUCList()->lappend() can raise OOM error,
> right?
Right.
> Is the same check in StartupDecodingContext() still needed? I.e. we can check the returned value
> by Assert() here.
Ah, thanks. I think we should avoid relying on assertions in
security-critical code, but I've simplified the dead code path to an
elog(ERROR).
> +# check.c assumes the list syntax of output_plugin_libraries is validated by the
> +# server, so take a moment to confirm that now. (This is difficult to test via
> +# regression suite, because our SET grammar won't accept the bad syntax.)
> ```
>
> Per my experiment, an SQL function set_config() is usable. So can't we put in guc.sql?
> PSA my idea.
Thank you! I completely forgot about set_config(); that should make
backpatching much simpler. I applied your patch with is_local set to
true instead of false, so a regression failure won't change state for
later tests in the file.
v2 attached.
Thanks,
--Jacob
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Add-a-check_hook-for-output_plugin_libraries.patch | application/octet-stream | 5.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matheus Alcantara | 2026-09-29 18:54:33 | Re: Enable partitionwise join for partition keys wrapped by RelabelType |
| Previous Message | Álvaro Herrera | 2026-09-29 18:45:31 | Re: ATTACH PARTITION cost grows linearly with pg_constraint size (seqscan in CloneFkReferenced), much worse since not-null constraints are in pg_constraint (PG 18) |