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

From: Myklebust, Bjørn Magnar <Bjorn(dot)Myklebust(at)skatteetaten(dot)no>
To: Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to check if a materialised view is being updated?
Date: 2021-01-19 12:54:36
Message-ID: 084A56E2-E565-4196-94D7-889DA85660C8@skatteetaten.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)jayadevan(at)gmail(dot)com>
Date: Tuesday, 19 January 2021 at 12:33
To: "Myklebust, Bjørn Magnar" <Bjorn(dot)Myklebust(at)skatteetaten(dot)no>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Philip Semanchuk 2021-01-19 13:40:03 Re: How to check if a materialised view is being updated?
Previous Message Jayadevan M 2021-01-19 11:33:33 Re: How to check if a materialised view is being updated?