Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y655j-0000gj-Um for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Dec 2014 22:16:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y655j-0001O4-CH for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Dec 2014 22:16:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y655h-0001Nx-Ll for pgsql-hackers@postgresql.org; Tue, 30 Dec 2014 22:16:37 +0000 Received: from outmail149081.authsmtp.net ([62.13.149.81]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y655c-00058J-G9 for pgsql-hackers@postgresql.org; Tue, 30 Dec 2014 22:16:36 +0000 Received: from mail-c237.authsmtp.com (mail-c237.authsmtp.com [62.13.128.237]) by punt18.authsmtp.com (8.14.2/8.14.2/) with ESMTP id sBUMGTKA031966 for ; Tue, 30 Dec 2014 22:16:29 GMT Received: from alvin.alvh.no-ip.org (client-186-11-225-174.imovil.entelpcs.cl [186.11.225.174] (may be forged)) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id sBUMGORl043371 for ; Tue, 30 Dec 2014 22:16:28 GMT Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 1DB051733; Tue, 30 Dec 2014 19:16:38 -0300 (CLST) Date: Tue, 30 Dec 2014 19:16:38 -0300 From: Alvaro Herrera To: pgsql-hackers@postgresql.org Subject: Re: [COMMITTERS] pgsql: pg_event_trigger_dropped_objects: Add name/args output columns Message-ID: <20141230221638.GV1645@alvh.no-ip.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Server-Quench: 80c6fb3a-9071-11e4-9f74-002590a135d3 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZcSBoa BzkeAQdJTRslYBtL RB4bawxAL0wRWh9I NgNaJ1FQPUcHbUle QCJcGQEXEQFvBiEi JQlRcnEIMVVMXwRu QEpLSFNUHgdhTx0J AAAfUwdwdQBYeXl0 ekNqWW9bEgcIEDsK PSwIFWkFZmBhJmIX VkEWfwMHdlUYfU5Y Y1B4VW4MYDADe3M2 QFN2Z2hrYGQHIX0O Hw1WO2gfEw44NRkZ YjE+IRgVJnhNXyoo Nhh0YkYTK0sPP0Mu Bkc7WF0XPgUlBhdZ B1lADBheLVsMTDYw X0tzUUJ8WDtURCob CwcnOVdPHyBKRzYQ D0xBVhQJEEs8 X-Authentic-SMTP: 61633235383639.1024:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 186.11.225.174/587 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Pg-Spam-Score: -0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Alvaro Herrera wrote: > pg_event_trigger_dropped_objects: Add name/args output columns > > These columns can be passed to pg_get_object_address() and used to > reconstruct the dropped objects identities in a remote server containing > similar objects, so that the drop can be replicated. This is causing buildfarm member dunlin to fail: ================== pgsql.build/src/test/regress/regression.diffs =================== *** /buildfarm/root/HEAD/pgsql.build/src/test/regress/expected/privileges.out Tue Dec 30 13:05:24 2014 --- /buildfarm/root/HEAD/pgsql.build/src/test/regress/results/privileges.out Tue Dec 30 13:10:49 2014 *************** *** 1323,1328 **** --- 1323,1329 ---- DROP SCHEMA testns CASCADE; NOTICE: drop cascades to table testns.acltest1 + ERROR: requested object address for object type that cannot support it SELECT d.* -- check that entries went away FROM pg_default_acl d LEFT JOIN pg_namespace n ON defaclnamespace = n.oid WHERE nspname IS NULL AND defaclnamespace != 0; No other member so far has reported a problem here. Not sure if that's the strangest bit, or the fact that dunlin is reporting anything in the first place. I can reproduce the problem quite simply by creating an event trigger on sql_drop and then try to drop an object not supported by getObjectIdentityParts -- in this case it's a default ACL for tables in the schema being dropped. My hope was that this check would help us detect new object types that did not have a working get_object_address representation, but since there are already cases that don't have it, it's currently bogus. We could add the default ACL support without too much effort, I think, but it would take even less effort to just remove the check. Another possible option is to mark ALTER DEFAULT PRIVILEGES as an unsupported command in event triggers. I'm not sure why we have it, particularly since we don't have GRANT and REVOKE ... but then my DDL deparsing patch is supposed to add support for GRANT and REVOKE, so I'm not really proposing this. Any strong opinions? -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers