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 1k3klt-0001TV-TU for pgsql-general@arkaria.postgresql.org; Thu, 06 Aug 2020 18:37:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k3kls-0004Eg-TB for pgsql-general@arkaria.postgresql.org; Thu, 06 Aug 2020 18:37:44 +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 1k3kky-0007QM-5p for pgsql-general@lists.postgresql.org; Thu, 06 Aug 2020 18:36:48 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k3kkv-0004cy-OU for pgsql-general@lists.postgresql.org; Thu, 06 Aug 2020 18:36:47 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 314F3C2F37; Thu, 6 Aug 2020 18:36:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo04-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo04-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x-t_addivom2; Thu, 6 Aug 2020 18:36:44 +0000 (UTC) Received: from shr-macbook-pro.local (unknown [4.28.96.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 73359C2B1D; Thu, 6 Aug 2020 18:36:42 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: privileges oddity From: Scott Ribe In-Reply-To: <2636627.1596738120@sss.pgh.pa.us> Date: Thu, 6 Aug 2020 12:36:41 -0600 Cc: PostgreSQL General Content-Transfer-Encoding: quoted-printable Message-Id: References: <2636627.1596738120@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3608.120.23.2.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Aug 6, 2020, at 12:22 PM, Tom Lane wrote: >=20 > Gonna need more context. The session-level user seems to have the > right privileges, but maybe something is happening inside a > security-definer function that doesn't have privileges? The only security definer function in the db is a simple pg_shadow = lookup used by pgbouncer. Hmm, I should check both direct to PG and through PG bouncer--even = though he is getting connected as the correct user, per PG's error in = the log.