Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVg8t-0007tJ-RD for pgsql-general@arkaria.postgresql.org; Tue, 06 Sep 2022 21:29:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oVg8r-0002oC-PD for pgsql-general@arkaria.postgresql.org; Tue, 06 Sep 2022 21:29:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVg8r-0002o1-Eo for pgsql-general@lists.postgresql.org; Tue, 06 Sep 2022 21:29:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oVg8l-00017R-N6 for pgsql-general@postgresql.org; Tue, 06 Sep 2022 21:29:55 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 286LTlsg3383980; Tue, 6 Sep 2022 17:29:47 -0400 From: Tom Lane To: "Dirschel, Steve" cc: Adrian Klaver , "pgsql-general@postgresql.org" Subject: Re: [EXT] Re: log_min_messages = warning In-reply-to: References: <3355583.1662497069@sss.pgh.pa.us> Comments: In-reply-to "Dirschel, Steve" message dated "Tue, 06 Sep 2022 21:02:59 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3383978.1662499787.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 06 Sep 2022 17:29:47 -0400 Message-ID: <3383979.1662499787@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Dirschel, Steve" writes: > setdatabase | setrole | = = setconfig > -------------+---------+------------------------------------------------= --------------------------------------------------------------------------= ---------------------------------------------------------------- > ------------------------------------------------------------------------= ---------------------------- > 16401 | 0 | {auto_explain.log_min_duration=3D-1} > 16401 | 10 | {log_min_messages=3Dpanic} > 16436 | 0 | {TimeZone=3DAmerica/Chicago} > 0 | 10 | {TimeZone=3Dutc,log_statement=3Dall,log_min_err= or_statement=3Ddebug5,log_min_messages=3Dpanic,exit_on_error=3D0,statement= _timeout=3D0,role=3Drdsadmin,auto_explain.log_min_duration=3D-1,temp_file_= limit=3D > -1,"search_path=3Dpg_catalog, public",pg_hint_plan.enable_hint=3Doff,def= ault_transaction_read_only=3Doff} > (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=3Dpanic", 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 =3D all to verify that. regards, tom lane