From: | Axel Rau <Axel(dot)Rau(at)chaos1(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Getting fancy errors when accessing information_schema on 10.5 |
Date: | 2018-10-30 13:02:33 |
Message-ID: | E45BA9F7-91F8-488D-8D25-5879AEC91725@Chaos1.DE |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-hackers |
> Am 30.10.2018 um 13:58 schrieb Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>
> Axel Rau <Axel(dot)Rau(at)Chaos1(dot)DE> writes:
>>> Am 30.10.2018 um 13:17 schrieb Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>> It doesn't happen for me either. Looking at the planner code, it seems
>>> like the relkind check should happen first because it'd be cheaper than
>>> the OR condition. Have you perhaps messed with the cost attributed to
>>> pg_has_role(), has_sequence_privilege(), or chareq()?
>
>> Not by intention. The instance has some history, it go back to 8.x I think.
>
>>> You could investigate with, eg,
>>>
>>> select oid::regprocedure, procost from pg_proc
>>> where proname = 'has_sequence_privilege';
>
>> nextcloud=> select oid::regprocedure, procost from pg_proc
>> nextcloud-> where proname = 'has_sequence_privilege';
>> oid | procost
>> ----------------------------------------+---------
>> has_sequence_privilege(name,text,text) | 1
>> has_sequence_privilege(name,oid,text) | 1
>> has_sequence_privilege(oid,text,text) | 1
>> has_sequence_privilege(oid,oid,text) | 1
>> has_sequence_privilege(text,text) | 1
>> has_sequence_privilege(oid,text) | 1
>> (6 rows)
>
> Hm, nothing surprising there, but what about the other two?
nextcloud=> select oid::regprocedure, procost from pg_proc
where proname = 'pg_has_role';
oid | procost
-----------------------------+---------
pg_has_role(name,name,text) | 1
pg_has_role(name,oid,text) | 1
pg_has_role(oid,name,text) | 1
pg_has_role(oid,oid,text) | 1
pg_has_role(name,text) | 1
pg_has_role(oid,text) | 1
(6 rows)
nextcloud=> select oid::regprocedure, procost from pg_proc
where proname = 'chareq';
oid | procost
-----------------------+---------
chareq("char","char") | 1
(1 row)
nextcloud=>
Axel
---
PGP-Key:29E99DD6 ☀ computing @ chaos claudius
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-10-30 13:12:43 | Re: creating table without columns |
Previous Message | Christoph Berg | 2018-10-30 13:00:09 | Re: creating table without columns |
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2018-10-30 13:13:33 | Re: Sequential UUID Generation |
Previous Message | Tom Lane | 2018-10-30 12:58:38 | Re: Getting fancy errors when accessing information_schema on 10.5 |