| 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-24 17:30:45 |
| Message-ID: | CAOYmi+mmK0e53zgwY=7vCzCnm=WWkm1eyF+vGxr5KR_ahDBNSw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Sep 23, 2026 at 11:41 PM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
> Thank for the patch.
Thanks for the review!
> 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)
Where did your double-quotes come from? If they came from a previous
`SET output_plugin_libraries = 'pgoutput, test_decoding'`, then that
wasn't a correct command; see below. Here's the output on my machine
after a fresh initdb:
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)
This is (unfortunately?) as designed, and it should match the behavior
of the other GUC_LIST_QUOTE variables. Quoting 'pgoutput, ' means that
you want to use a plugin named "pgoutput, .so" on disk, which you're
allowed to do.
The correct way to set output_plugin_libraries would be
SET output_plugin_libraries = pgoutput, test_decoding;
or
SET output_plugin_libraries = 'pgoutput', 'test_decoding';
I think that behavior is confusing for people who expect to have to
quote the whole thing (including me). But it's presumably tied to how
we want search_path to behave for everyone, so changing it would
probably be a very big project.
Thanks,
--Jacob
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bernd Reiß | 2026-09-24 17:33:59 | Re: [Patch] New pg_stat_tablespace view |
| Previous Message | Matthias van de Meent | 2026-09-24 17:03:45 | BUG: pg_class.relchecks overflow, making table undroppable |