Re: Unfiltered server logs routing via a new elog hook or existing emit_log_hook bypassing log_min_message check

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Unfiltered server logs routing via a new elog hook or existing emit_log_hook bypassing log_min_message check
Date: 2022-05-02 14:03:23
Message-ID: 20220502140323.otjmsqrathummppf@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 02, 2022 at 07:24:04PM +0530, Bharath Rupireddy wrote:
> On Mon, May 2, 2022 at 6:44 PM Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
> >
> > I know. What I said you could do is configure log_min_message to DEBUGX, so
> > your extension sees everything you want it to see. And *in your extension* set
> > output_to_server to false if the level is not the *real level* you want to log.
>
> I basically want to avoid normal users/developers setting any
> parameter (especially the superuser-only log_min_message GUC, all
> users might not have superuser access in production environments) or
> making any changes to the running server except just LOADing the
> server log routing/intercepting extension.

The kind of scenario you mentioned didn't seem "normal users" oriented. Note
that LOAD is restricted to superuser anyway.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-05-02 14:03:58 Re: configure openldap crash warning
Previous Message Pavel Stehule 2022-05-02 14:02:18 Re: strange slow query - lost lot of time somewhere