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 1ps3Rx-0006nk-60 for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Apr 2023 15:22:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ps3Ru-0007ec-Fg for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Apr 2023 15:22:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ps3Ru-0007eS-6E for pgsql-hackers@lists.postgresql.org; Thu, 27 Apr 2023 15:22:22 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ps3Rl-002CB8-Ml for pgsql-hackers@postgresql.org; Thu, 27 Apr 2023 15:22:20 +0000 Received: from [192.168.100.207] (unknown [176.29.117.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id D38825466A for ; Thu, 27 Apr 2023 15:22:11 +0000 (UTC) Message-ID: Date: Thu, 27 Apr 2023 18:22:09 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US To: Pg Hackers From: David Steele Subject: Possible regression setting GUCs on \connect Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hackers, I have been updating pgAudit for PG16 and ran into the following issue in the regression tests: \connect - user1 WARNING: permission denied to set parameter "pgaudit.log_level" This happens after switching back and forth a few times between the current user when the regression script was executed and user1 which is created in the script. Specifically, it happens at [1]. I have tracked the issue down to context == PGC_USERSET for case PGC_SUSET in set_config_option_ext(). This GUC is PGC_SUSET so it seems like once it is set reloading it should not be an issue. If the GUC is set again immediately before the \connect then there is no error, so it looks like the correct context is being lost somewhere along the way. Before I get into serious debugging on this issue, I thought it would be good to bring it up in case the answer is obvious to someone else. Thanks, -David [1] https://github.com/pgaudit/pgaudit/compare/dev-pg16-ci#diff-db4bb73982787fa1d07d4c9d80bc54028b8d2a52b80806f1352a42c42f00eaaaR604