From: | Tatsuro Yamada <yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
Cc: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CLUSTER command progress monitor |
Date: | 2017-09-04 02:37:04 |
Message-ID: | 59ACBC50.3090106@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)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
Attachment | Content-Type | Size |
---|---|---|
progress_monitor_cluster_v2.patch | text/x-patch | 16.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2017-09-04 02:38:01 | Re: Secondary index access optimizations |
Previous Message | Amit Kapila | 2017-09-04 02:18:50 | Re: Fix warnings and typo in dshash |