Re: Prevent remote libpq notices from being sent to clients

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>
Subject: Re: Prevent remote libpq notices from being sent to clients
Date: 2026-06-05 14:28:44
Message-ID: CAHGQGwH8De4O1mBZRHWATngQOqCb+1p741DW1rBKgWu2wkfaLw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 5, 2026 at 6:32 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
> So remote messages should only be output to the server log, but currently they can leak to the client if client_min_messages is set to log.

I'm not sure whether it's good idea to add this limitation.

I just thought that some users might find it useful to send log messages
containing remote messages to the client when needed. For example,
in the following case, at least for me it seems helpful to see the LOG
message including the remote message:

=# SELECT * FROM dblink_exec(..., 'create table if not exists t(i int)');
LOG: received message via remote connection: NOTICE: relation
"t" already exists, skipping

So I'd like to hear more opinions from others. If the consensus is that
remote messages should never be sent to the client, I'm fine with
adding the limitation.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message zengman 2026-06-05 14:29:12 (SQL/PGQ) Clean up orphaned properties when dropping a label
Previous Message Tom Lane 2026-06-05 14:08:29 Re: Fix domain fast defaults on empty tables