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 1ow2PS-0004FC-NU for pgsql-general@arkaria.postgresql.org; Fri, 18 Nov 2022 14:32:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ow2PR-0002Ib-Kh for pgsql-general@arkaria.postgresql.org; Fri, 18 Nov 2022 14:32:01 +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 1ow2PR-0002IL-9y for pgsql-general@lists.postgresql.org; Fri, 18 Nov 2022 14:32:01 +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 1ow2PL-0007B8-TH for pgsql-general@lists.postgresql.org; Fri, 18 Nov 2022 14:31:57 +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 2AIEVllb2184328; Fri, 18 Nov 2022 09:31:47 -0500 From: Tom Lane To: Murillo corvino rocha cc: Adrian Klaver , "pgsql-general@lists.postgresql.org" Subject: Re: RES: session_user different from current_user after normal login In-reply-to: References: <359ae842-c217-1055-e24b-173918c1e5f3@aklaver.com> Comments: In-reply-to Murillo corvino rocha message dated "Thu, 17 Nov 2022 21:26:17 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2184326.1668781907.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 18 Nov 2022 09:31:47 -0500 Message-ID: <2184327.1668781907@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Murillo corvino rocha writes: > I am just logging in (using psql) and doing the select: SELECT session_u= ser, current_user; > The PostgreSQL is an AWS RDS 12.12 instance. No script is being executed= . No one besides me is connected to the database. Could it be any server l= evel configuration? I=C2=92m pretty sure that few configurations were made= to this database. I believe it's possible to do ALTER USER ... SET ROLE ... or ALTER DATABASE ... SET ROLE ..., which'd produce this sort of effect. psql's "\drds" metacommand would help remind you of any such settings. I can't offhand think of any other server-side configuration that would do it. regards, tom lane