Re: [HACKERS] CLUSTER command progress monitor

Поиск
Список
Период
Сортировка
От Tatsuro Yamada
Тема Re: [HACKERS] CLUSTER command progress monitor
Дата
Msg-id 59ACBC50.3090106@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] CLUSTER command progress monitor  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: [HACKERS] CLUSTER command progress monitor  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
Hi Sawada-san, Thomas,

Thanks for sharing the reggression.diff.
I realized Thomas's comment is right.

Attached patch is fixed version.
Could you try it?

Regards,

Tatsuro Yamada
NTT Open Source Software Center

On 2017/09/01 17:59, Masahiko Sawada wrote:
> On Fri, Sep 1, 2017 at 3:38 PM, Tatsuro Yamada
> <yamada.tatsuro@lab.ntt.co.jp> wrote:
>> Hi Thomas,
>>
>>>> Any comments or suggestion are welcome.
>>>
>>>
>>> Although this patch updates src/test/regress/expected/rules.out I
>>> think perhaps you included the wrong version?  That regression test
>>> fails for me
>>
>>
>> Thanks for the comment.
>>
>> I use the patch on 7b69b6ce and it's fine.
>> Did you use "initdb" command after "make install"?
>> The pg_stat_progress_cluster view is created in initdb, probably.
>>
>
> I also got a regression test error (applied to abe85ef). Here is
> regression.diff file.
>
> *** /home/masahiko/source/postgresql/src/test/regress/expected/rules.out
>         2017-09-01 17:27:33.680055612 -0700
> --- /home/masahiko/source/postgresql/src/test/regress/results/rules.out
> 2017-09-01 17:28:10.410055596 -0700
> ***************
> *** 1819,1824 ****
> --- 1819,1849 ----
>        pg_stat_get_db_conflict_bufferpin(d.oid) AS confl_bufferpin,
>        pg_stat_get_db_conflict_startup_deadlock(d.oid) AS confl_deadlock
>       FROM pg_database d;
> + pg_stat_progress_cluster| SELECT s.pid,
> +     s.datid,
> +     d.datname,
> +     s.relid,
> +         CASE s.param1
> +             WHEN 0 THEN 'initializing'::text
> +             WHEN 1 THEN 'scanning heap'::text
> +             WHEN 2 THEN 'sorting tuples'::text
> +             WHEN 3 THEN 'writing new heap'::text
> +             WHEN 4 THEN 'scan heap and write new heap'::text
> +             WHEN 5 THEN 'swapping relation files'::text
> +             WHEN 6 THEN 'rebuilding index'::text
> +             WHEN 7 THEN 'performing final cleanup'::text
> +             ELSE NULL::text
> +         END AS phase,
> +         CASE s.param2
> +             WHEN 0 THEN 'index scan'::text
> +             WHEN 1 THEN 'seq scan'::text
> +             ELSE NULL::text
> +         END AS scan_method,
> +     s.param3 AS scan_index_relid,
> +     s.param4 AS heap_tuples_total,
> +     s.param5 AS heap_tuples_scanned
> +    FROM (pg_stat_get_progress_info('CLUSTER'::text) s(pid, datid,
> relid, param1, param2, param3, param4, param5, param6, param7, param8,
> param9, param10)
> +      LEFT JOIN pg_database d ON ((s.datid = d.oid)));
>    pg_stat_progress_vacuum| SELECT s.pid,
>        s.datid,
>        d.datname,
> ***************
> *** 1841,1871 ****
>        s.param7 AS num_dead_tuples
>       FROM (pg_stat_get_progress_info('VACUUM'::text) s(pid, datid,
> relid, param1, param2, param3, param4, param5, param6, param7, param8,
> param9, param10)
>         LEFT JOIN pg_database d ON ((s.datid = d.oid)));
> - pg_stat_progress_cluster| SELECT
> -     s.pid,
> -     s.datid,
> -     d.datname,
> -     s.relid,
> -         CASE s.param1
> -             WHEN 0 THEN 'initializing'::text
> -             WHEN 1 THEN 'scanning heap'::text
> -             WHEN 2 THEN 'sorting tuples'::text
> -             WHEN 3 THEN 'writing new heap'::text
> -             WHEN 4 THEN 'scan heap and write new heap'::text
> -             WHEN 5 THEN 'swapping relation files'::text
> -             WHEN 6 THEN 'rebuilding index'::text
> -             WHEN 7 THEN 'performing final cleanup'::text
> -             ELSE NULL::text
> -         END AS phase,
> -         CASE S.param2
> -             WHEN 0 THEN 'index scan'
> -             WHEN 1 THEN 'seq scan'
> -             END AS scan_method,
> -     s.param3 AS index_relid,
> -     s.param4 AS heap_blks_total,
> -     s.param5 AS heap_blks_scanned
> -    FROM (pg_stat_get_progress_info('CLUSTER'::text) s(pid, datid,
> relid, param1, param2, param3, param4, param5)
> -      LEFT JOIN pg_database d ON ((s.datid = d.oid)));
>    pg_stat_replication| SELECT s.pid,
>        s.usesysid,
>        u.rolname AS usename,
> --- 1866,1871 ----
>
> ======================================================================
>
> Regards,
>
> --
> Masahiko Sawada
> NIPPON TELEGRAPH AND TELEPHONE CORPORATION
> NTT Open Source Software Center




-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] Fix warnings and typo in dshash
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] Secondary index access optimizations