Re: How to check if a materialised view is being updated? - Mailing list pgsql-general

From Myklebust, Bjørn Magnar
Subject Re: How to check if a materialised view is being updated?
Date
Msg-id 084A56E2-E565-4196-94D7-889DA85660C8@skatteetaten.no
Whole thread Raw
In response to Re: How to check if a materialised view is being updated?  (Jayadevan M <maymala.jayadevan@gmail.com>)
List pgsql-general

Thanks for the tip, Jayadevan!

Looks like your suggestion can help med with this.

I’m getting all the info I need from this view.

 

Cheers,

Bjørn

 

 

From: Jayadevan M <maymala.jayadevan@gmail.com>
Date: Tuesday, 19 January 2021 at 12:33
To: "Myklebust, Bjørn Magnar" <Bjorn.Myklebust@skatteetaten.no>
Cc: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Subject: Re: How to check if a materialised view is being updated?

 

 

 

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?

 

Regards,

Jayadevan



Denne e-posten og eventuelle vedlegg er beregnet utelukkende for den institusjon eller person den er rettet til og kan være belagt med lovbestemt taushetsplikt. Dersom e-posten er feilsendt, vennligst slett den og kontakt Skatteetaten.
The contents of this email message and any attachments are intended solely for the addressee(s) and may contain confidential information and may be legally protected from disclosure. If you are not the intended recipient of this message, please immediately delete the message and alert the Norwegian Tax Administration.

pgsql-general by date:

Previous
From: Jayadevan M
Date:
Subject: Re: How to check if a materialised view is being updated?
Next
From: Philip Semanchuk
Date:
Subject: Re: How to check if a materialised view is being updated?