Re: [EXT] Re: log_min_messages = warning

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dirschel, Steve" <steve(dot)dirschel(at)thomsonreuters(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [EXT] Re: log_min_messages = warning
Date: 2022-09-06 21:29:47
Message-ID: 3383979.1662499787@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Dirschel, Steve" <steve(dot)dirschel(at)thomsonreuters(dot)com> writes:
> setdatabase | setrole | setconfig

> -------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> ----------------------------------------------------------------------------------------------------
> 16401 | 0 | {auto_explain.log_min_duration=-1}
> 16401 | 10 | {log_min_messages=panic}
> 16436 | 0 | {TimeZone=America/Chicago}
> 0 | 10 | {TimeZone=utc,log_statement=all,log_min_error_statement=debug5,log_min_messages=panic,exit_on_error=0,statement_timeout=0,role=rdsadmin,auto_explain.log_min_duration=-1,temp_file_limit=
> -1,"search_path=pg_catalog, public",pg_hint_plan.enable_hint=off,default_transaction_read_only=off}
> (4 rows)

> If I login to the shgroup02s database as postgres user (using psql) and
> interactively call a procedure that cron calls which causes the RAISE
> NOTICE commands to be written to the log they do NOT get written to the
> log when I call the procedure. The messages will be displayed on my
> screen but I don't see them getting written to the log.

You've evidently done "ALTER USER postgres SET log_min_messages=panic",
so the lack of any messages under that userid is unsurprising. But
we're not a lot closer to being sure why it's different for the
procedures' normal execution environment.

At this point it's hard to avoid the conclusion that those procedures'
session is changing the value itself. (This is scary, because it implies
that you're running those as superuser, which seems like a bad idea.)
You might have to enable log_statement = all to verify that.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2022-09-07 00:52:42 Re: Feature proposal: immutable/sealed partitions (and maybe tables, too)
Previous Message Dirschel, Steve 2022-09-06 21:02:59 RE: [EXT] Re: log_min_messages = warning