On 2016/03/09 0:24, Robert Haas wrote:
> On Tue, Mar 8, 2016 at 3:02 AM, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> Updated versions attached.
>>
>> * changed st_progress_param to int64 and so did the argument of
>> pgstat_progress_update_param(). Likewise changed param1..param10 of
>> pg_stat_get_progress_info()'s output columns to bigint.
>>
>> * Added back the Oid field st_command_target and corresponding function
>> pgstat_progress_set_command_target(Oid).
>
> What the heck do we have an SQL-visible pg_stat_reset_local_progress()
> for? Surely if we ever need that, it's a bug.
OK, now I am not sure what I was thinking adding that function. Removed.
> I think pgstat_progress_update_param() should Assert(index >= 0 &&
> index < N_PROGRESS_PARAM). But I'd rename N_PROGRESS_PARAM to
> PGSTAT_NUM_PROGRESS_PARAM.
Agreed, done.
> Regarding "XXX - privilege check is maybe dubious" - I think the
> privilege check here should match pg_stat_activity. If it does,
> there's nothing dubious about that IMHO.
OK, done. So, it shows pid column to all, while rest of the values -
relid, param1..param10 are only shown to role members. Unlike
pg_stat_activity, there is no text column to stash a "<insufficient
privilege>" message into, so all that's done is to output null values.
The attached revision addresses above and one of Horiguchi-san's comments
in his email yesterday.
Thanks a lot for the review.
Thanks,
Amit