Re: CLUSTER command progress monitor

From: Tatsuro Yamada <yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Cc: michael(dot)paquier(at)gmail(dot)com, thomas(dot)munro(at)enterprisedb(dot)com, sawada(dot)mshk(at)gmail(dot)com
Subject: Re: CLUSTER command progress monitor
Date: 2017-09-06 06:58:26
Message-ID: 59AF9C92.4080904@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Hackers,

I revised the patch like this:

- Add "command" column in the view
It tells that the running command is CLUSTER or VACUUM FULL.

- Enable VACUUM FULL progress monitor
Add heap_tuples_vacuumed and heap_tuples_recently_dead as a counter in the view.
Sequence of phases are below:
1. scanning heap
5. swapping relation files
6. rebuild index
7. performing final cleanup

I didn't change the name of view (pg_stat_progress_cluster) because I'm not sure
whether the new name (pg_stat_progress_reorg) is suitable or not.

Any comments or suggestion are welcome.

Thanks,
Tatsuro Yamada

On 2017/09/04 20:17, Tatsuro Yamada wrote:
> On 2017/09/04 15:38, Michael Paquier wrote:
>> On Thu, Aug 31, 2017 at 11:12 AM, Tatsuro Yamada
>> <yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>>> Then I have questions.
>>>
>>> * Should we have separate views for them? Or should both be covered by the
>>> same view with some indication of which command (CLUSTER or VACUUM FULL)
>>> is actually running?
>>
>> Using the same view for both, and tell that this is rather VACUUM or
>> CLUSTER in the view, would be better IMO. Coming up with a name more
>> generic than pg_stat_progress_cluster may be better though if this
>> speaks with VACUUM FULL as well, user-facing documentation does not
>> say that VACUUM FULL is actually CLUSTER.
>
> Thanks for sharing your thoughts.
> Agreed.
> I'll add new column like a "command" to tell whether running CLUSTER or VACUUM.
> And how about this new view name?
> - pg_stat_progress_reorg
> Is it more general name than previous name if it covers both commands?
>
>
>>> I'll add this patch to CF2017-09.
>>> Any comments or suggestion are welcome.
>>
>> Nice to see that you are taking the time to implement patches for
>> upstream, Yamada-san!
>
> Same here. :)
> I'd like to contribute creating feature that is for DBA and users.
> Progress monitoring feature is important from my DBA experiences.
> I'm happy if you lend your hand.
>
> Thanks,
> Tatsuro Yamada

Attachment Content-Type Size
progress_monitor_cluster_v3.patch text/x-patch 21.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-09-06 07:01:14 Re: pgbench: Skipping the creating primary keys after initialization
Previous Message Michael Paquier 2017-09-06 06:51:14 Re: cache lookup errors for missing replication origins