Search Postgresql Archives

Re: How to check if a materialised view is being updated?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Jan 19, 2021, at 6:33 AM, Jayadevan M <maymala.jayadevan@xxxxxxxxx> wrote:
> 
> 
> 
> So I’m looking for a way to identify if the refresh process is finished or if it’s still running  - preferably without having to wait for timeout by querying a locked materialized view.  But by e.g. using the system tables or otherwise.
> 
>  
> 
> Can anybody suggest some pointers on how to do this?
> 
>  
> Maybe pg_stat_activity will have the refresh query?

Yes, pg_stat_activity has a query column that could be searched with the regular string matching tools, including regex if necessary. pg_stat_activity also has some other useful columns that, like query_start which can tell you how long the query has been running.

Cheers
Philip





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux