From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dirschel, Steve <steve.dirschel@thomsonreuters.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: [EXT] Re: log_min_messages = warning
Date: Tue, 06 Sep 2022 17:29:47 -0400
Message-ID: <3383979.1662499787@sss.pgh.pa.us> (raw)
In-Reply-To: <DM6PR03MB43324EBE72A141DA36825271FA7E9@DM6PR03MB4332.namprd03.prod.outlook.com>
References: <DM6PR03MB433216774DF79FF496ADB14DFA7E9@DM6PR03MB4332.namprd03.prod.outlook.com>
<db960e23-11ec-dca7-c415-27e174e8d036@aklaver.com>
<DM6PR03MB433212E04F2DCEE232ADBAFEFA7E9@DM6PR03MB4332.namprd03.prod.outlook.com>
<3355583.1662497069@sss.pgh.pa.us>
<DM6PR03MB43324EBE72A141DA36825271FA7E9@DM6PR03MB4332.namprd03.prod.outlook.com>
"Dirschel, Steve" <steve.dirschel@thomsonreuters.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, steve.dirschel@thomsonreuters.com, adrian.klaver@aklaver.com
Subject: Re: [EXT] Re: log_min_messages = warning
In-Reply-To: <3383979.1662499787@sss.pgh.pa.us>
References: <DM6PR03MB433216774DF79FF496ADB14DFA7E9@DM6PR03MB4332.namprd03.prod.outlook.com> <db960e23-11ec-dca7-c415-27e174e8d036@aklaver.com> <DM6PR03MB433212E04F2DCEE232ADBAFEFA7E9@DM6PR03MB4332.namprd03.prod.outlook.com> <3355583.1662497069@sss.pgh.pa.us> <DM6PR03MB43324EBE72A141DA36825271FA7E9@DM6PR03MB4332.namprd03.prod.outlook.com> <3383979.1662499787@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox