Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM
Date
Msg-id CAGECzQSSeAesqZE0P1P=FmVJ-7ee=yfQiLqECKiQVmjo8v5FzQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM  (Kirill Reshke <reshkekirill@gmail.com>)
Responses Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM
List pgsql-hackers
On Thu, 4 Dec 2025 at 19:49, Kirill Reshke <reshkekirill@gmail.com> wrote:
> > Good question. I think the easiest would be to always disallow FROM
> > PROGRAM (by default) instead of only when connecting over the network.
>
> How? with GUC?

I meant, sidestep this problem completely by not doing my idea of
still allowing FROM PROGRAM over unix connections. And instead
disallowing it for any connections.

> > Another option would be to have dblink (and pg_fdw) tell postgres (wih
> > e.g. a GUC being set in the StartupMessage) that it should be
> > considered a remote connection for these purposes.
>
> Again, if we are using GUC to tell somebody something about security,
> this doesn't work. Superuser can easily redefine any GUC.

If you mark this GUC as PGC_BACKEND it cannot be changed with SET
commands, not even by superusers.



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: making tid and HOTness of UPDATE available to logical decoding plugins
Next
From: Álvaro Herrera
Date:
Subject: Re: bt_index_parent_check and concurrently build indexes