Re: pg_createsubscriber does not check output_plugin_libraries - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: pg_createsubscriber does not check output_plugin_libraries
Date
Msg-id CAHGQGwERPHMz5+KywsHvfU6pgU2pWbRbY7RZOrs82Ok_nPPXoQ@mail.gmail.com
Whole thread
In response to RE: pg_createsubscriber does not check output_plugin_libraries  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
List pgsql-hackers
On Tue, Sep 8, 2026 at 7:52 PM Hayato Kuroda (Fujitsu)
<kuroda.hayato@fujitsu.com> wrote:
> Good point, should be fixed. I came up with an idea to spedcify missing_ok := true
> for current_setting(), and skip checking if it returns NULL. Thought?

Using missing_ok = true seems fine for older minor versions that don't
support output_plugin_libraries, but it doesn't handle insufficient
privileges cases, does it? current_setting('output_plugin_libraries', true)
still raises a permission-denied error if the current user cannot examine
the setting, no?

How about querying pg_settings instead? For example,

    SELECT setting
    FROM pg_catalog.pg_settings
    WHERE name = 'output_plugin_libraries';

This returns no rows if the parameter doesn't exist or the current user
doesn't have permission to examine it, so we could skip the check for
that database in either case.

Regards,

--
Fujii Masao



pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: Add ssl_(supported|shared)_groups to sslinfo
Next
From: Rui Zhao
Date:
Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements