From: | "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Allow pg_read_all_stats to read pg_stat_progress_* |
Date: | 2020-04-15 10:58:05 |
Message-ID: | 9CE655FA-DE5F-4028-9585-4597283685E3@yandex-team.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> 15 апр. 2020 г., в 15:25, Magnus Hagander <magnus(at)hagander(dot)net> написал(а):
>
>
> I think that makes perfect sense. The documentation explicitly says "can read all pg_stat_* views", which is clearly wrong -- so either the code or the docs should be fixed, and it looks like it's the code that should be fixed to me.
Should it be bug or v14 feature?
Also pgstatfuncs.c contains a lot more checks of has_privs_of_role(GetUserId(), beentry->st_userid).
Maybe grant them all?
> As for the patch, one could argue that we should just store the resulting boolean instead of re-running the check (e.g. have a "bool has_stats_privilege" or such), but perhaps that's an unnecessary micro-optimization, like the attached.
Looks good to me.
Thanks!
Best regards, Andrey Borodin.
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2020-04-15 11:15:39 | Re: Parallel copy |
Previous Message | Magnus Hagander | 2020-04-15 10:25:20 | Re: Allow pg_read_all_stats to read pg_stat_progress_* |