On Wed, Sep 23, 2026 at 11:41 PM Hayato Kuroda (Fujitsu)
<[email protected]> 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


Reply via email to