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

Поиск
Список
Период
Сортировка
От Philip Semanchuk
Тема Re: How to check if a materialised view is being updated?
Дата
Msg-id 21D0846C-032D-4469-B8FF-39EC4368D6DE@americanefficient.com
обсуждение исходный текст
Ответ на Re: How to check if a materialised view is being updated?  (Jayadevan M <maymala.jayadevan@gmail.com>)
Список pgsql-general

> On Jan 19, 2021, at 6:33 AM, Jayadevan M <maymala.jayadevan@gmail.com> wrote:
>
>
>
> So I’m looking for a way to identify if the refresh process is finished or if it’s still running  - preferably
withouthaving 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
ifnecessary. pg_stat_activity also has some other useful columns that, like query_start which can tell you how long the
queryhas been running. 

Cheers
Philip


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

Предыдущее
От: Myklebust, Bjørn Magnar
Дата:
Сообщение: Re: How to check if a materialised view is being updated?
Следующее
От: Kämpf, Heiko (OWL-IT)
Дата:
Сообщение: Ist there a chance to provide postGIS 3.x combined with postgreSQL12 or 13 as a zypper repository released for SLES15 SP1 or SP2