Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffBjt-0006hM-76 for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Jul 2018 22:13:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ffBjq-0008AV-Ds for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Jul 2018 22:13:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffBjq-0008AO-7m for pgsql-bugs@lists.postgresql.org; Mon, 16 Jul 2018 22:13:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffBjj-00048Q-8L for pgsql-bugs@lists.postgresql.org; Mon, 16 Jul 2018 22:13:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w6GMCoif009787; Mon, 16 Jul 2018 18:12:50 -0400 From: Tom Lane To: Tomas Vondra cc: torcher999@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15281: Set role does not affect superuser privleges In-reply-to: References: <153175290278.1396.6851104739737410645@wrigleys.postgresql.org> Comments: In-reply-to Tomas Vondra message dated "Mon, 16 Jul 2018 23:48:43 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9785.1531779170.1@sss.pgh.pa.us> Date: Mon, 16 Jul 2018 18:12:50 -0400 Message-ID: <9786.1531779170@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > On 07/16/2018 04:55 PM, PG Bug reporting form wrote: >> Here are the two scenarios I tested: >> 1) as a session_user: superuser and current_user: non-superuser I can edit >> others' tables >> 2) as a session_user: non-superuser and current_user: superuser I cannot >> edit others' tables > It's usually a good idea to provide exact scripts / output so that > people can reproduce the issue easily. For me it behaves like this: > ... > So, correct in both cases. I'm not on Windows, but I don't see why would > it behave differently there. Tomas' test left out the "GRANT user0 to user1" bit, but I can't reproduce the behavior as described either. regards, tom lane