Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHVCE-0005fF-Jr for pgsql-admin@arkaria.postgresql.org; Tue, 30 Oct 2018 14:40:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gHVCD-00033J-0R for pgsql-admin@arkaria.postgresql.org; Tue, 30 Oct 2018 14:40:41 +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 1gHVCC-00033B-P3 for pgsql-admin@lists.postgresql.org; Tue, 30 Oct 2018 14:40:40 +0000 Received: from mx1.mailbox.org ([2001:67c:2050:104:0:1:25:1]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gHVCA-0000i0-SB for pgsql-admin@postgresql.org; Tue, 30 Oct 2018 14:40:40 +0000 Received: from smtp1.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 982794B99F; Tue, 30 Oct 2018 15:40:36 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id 1abPSWj6Eh2W; Tue, 30 Oct 2018 15:40:35 +0100 (CET) Message-ID: Subject: Re: Getting fancy errors when accessing information_schema on 10.5 From: Laurenz Albe To: Axel Rau , Tom Lane Cc: pgsql-admin@postgresql.org Date: Tue, 30 Oct 2018 15:40:34 +0100 In-Reply-To: References: <4880e067723cefc1dc2e08a117f96de26ae0f797.camel@cybertec.at> <44D4C7B1-0DCF-4166-9DB8-B5D75EB2985E@Chaos1.DE> <20191.1540901834@sss.pgh.pa.us> <31055688b81895792fa7d8c61e07dca7add3dbb9.camel@cybertec.at> <15908.1540907134@sss.pgh.pa.us> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Axel Rau wrote: > nextcloud=> explain select ((pg_has_role(relowner, 'USAGE'::text) OR has_sequence_privilege(oid, 'SELECT, UPDATE, USAGE'::text))) from pg_class; > QUERY PLAN > ----------------------------------------------------------- > Seq Scan on pg_class (cost=0.00..28.56 rows=656 width=1) > (1 row) > > nextcloud=> explain select (relkind = 'S'::"char") from pg_class; > QUERY PLAN > ----------------------------------------------------------- > Seq Scan on pg_class (cost=0.00..28.56 rows=656 width=1) > (1 row) Hm, strange, for me the first query is slightly more expensive (because of the OR), but the costs are pretty similar. Another idea I have is to raise the costs of "has_sequence_privilege" slightly. Yours, Laurenz Albe