From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Dirschel, Steve <steve.dirschel@thomsonreuters.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: log_min_messages = warning
Date: Tue, 6 Sep 2022 12:45:50 -0700
Message-ID: <db960e23-11ec-dca7-c415-27e174e8d036@aklaver.com> (raw)
In-Reply-To: <DM6PR03MB433216774DF79FF496ADB14DFA7E9@DM6PR03MB4332.namprd03.prod.outlook.com>
References: <DM6PR03MB433216774DF79FF496ADB14DFA7E9@DM6PR03MB4332.namprd03.prod.outlook.com>
On 9/6/22 12:07, Dirschel, Steve wrote:
> We recently upgraded from postgres 12.8 to 14.3. We are running Aurora
> Postgres on AWS.
>
> We have procedures that will make calls to RAISE NOTICE to write out
> messages if you interactively call the procedure through psql. These
> procedures are getting called by pg_cron.
>
> Since upgrading these RAISE NOTICE messages are getting written to the
> postgres log file:
>
> For example:
>
> 13:45:00.720882-05
>
> CONTEXT: PL/pgSQL function perf.snap_stats() line 242 at RAISE
>
> 2022-09-06 18:45:01 UTC::@:[21535]:LOG: cron job 2: NOTICE: Snapping
> dba_hist_system_event at 2022-09-06 13:45:00.725818-05
>
> Log_min_messages is set to warning so my understanding is that should
> only log messages at warning, error, log, fatal, or panic. Any idea how
> to troubleshoot why these are getting written to the log file?
1) Has log_min_messages been commented out?
2) Was the setting changed from something else?
3) If 2) was the server reloaded/restarted to catch the change?
4) Are you sure you are looking at the correct setting?
Try:
select setting, source, sourcefile, pending_restart from pg_settings
where name = 'log_min_messages';
to see if the value is coming from something like an include file.
>
> Thanks
>
> This e-mail is for the sole use of the intended recipient and contains
> information that may be privileged and/or confidential. If you are not
> an intended recipient, please notify the sender by return e-mail and
> delete this e-mail and any attachments. Certain required legal entity
> disclosures can be accessed on our website:
> https://www.thomsonreuters.com/en/resources/disclosures.html
--
Adrian Klaver
adrian.klaver@aklaver.com
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: adrian.klaver@aklaver.com, steve.dirschel@thomsonreuters.com
Subject: Re: log_min_messages = warning
In-Reply-To: <db960e23-11ec-dca7-c415-27e174e8d036@aklaver.com>
References: <DM6PR03MB433216774DF79FF496ADB14DFA7E9@DM6PR03MB4332.namprd03.prod.outlook.com> <db960e23-11ec-dca7-c415-27e174e8d036@aklaver.com>
* 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