Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a9Kkg-0006Y0-Ca for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Dec 2015 22:40:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a9Kkf-0004x3-Uj for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Dec 2015 22:40:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a9Kk3-0004FX-G9 for pgsql-bugs@postgresql.org; Wed, 16 Dec 2015 22:40:15 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1a9Kk0-0000Vv-7i for pgsql-bugs@postgresql.org; Wed, 16 Dec 2015 22:40:14 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.53.52]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id E2154400E55; Wed, 16 Dec 2015 14:40:06 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 0E609EA9; Wed, 16 Dec 2015 19:40:05 -0300 (CLT) Date: Wed, 16 Dec 2015 19:40:05 -0300 From: Alvaro Herrera To: Bruce Momjian Cc: Alexey Bashtanov , pgsql-bugs@postgresql.org Subject: Re: BUG #9923: "reassign owned" does not change permissions grantor Message-ID: <20151216224004.GL2618@alvherre.pgsql> References: <5344F82D.8000809@imap.cc> <20150109181948.GC26812@momjian.us> <20150122173756.GG27749@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150122173756.GG27749@momjian.us> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Bruce Momjian wrote: > On Fri, Jan 9, 2015 at 01:19:48PM -0500, Bruce Momjian wrote: > > I can confirm this bug report from April, and your analysis of the fixes > > --- we were missing calls to aclnewowner() for types, foreign servers, > > and foreign data wrappers, for both REASSIGN and ALTER OWNER TO. > > > > With the attached SQL script you can see the ACL fields properly > > changing to match the object owner (attached). Without the patch, only > > the table's ACL changes. > > > > The patch also changes the regression output --- I think that is because > > the object ownership changes remove certain duplicates from the ACL > > list. > > Patch applied. Thank you for the excellent bug report. I just realized that you didn't backpatch this bug fix, and therefore my fix for bug #13666 fails to cherry-pick sanely on 9.4 and earlier. I think this should be back-patched. This is the changelog entry: Author: Bruce Momjian Branch: master Release: REL9_5_BR [59367fdf9] 2015-01-22 12:36:55 -0500 adjust ACL owners for REASSIGN and ALTER OWNER TO When REASSIGN and ALTER OWNER TO are used, both the object owner and ACL list should be changed from the old owner to the new owner. This patch fixes types, foreign data wrappers, and foreign servers to change their ACL list properly; they already changed owners properly. BACKWARD INCOMPATIBILITY? Report by Alexey Bashtanov -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs