512426 | | || | | |
| 245/1163 | 15932 | AccessExclusiveLock | f | f
(1 row)
From: Tom Lane
Date: Thursday, August 24, 2023 at 3:02 PM
To: Hellen Jiang
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Materialized view refr
Hellen Jiang writes:
> When the materialized view was refreshing concurrently, I saw the pg_lock
> like this: there was no response within 30 seconds when the api calls this
> query, and we got api time out.
Well, that seems to confirm my idea that the REFRESH is blocked behind
somebody else's
Hellen Jiang writes:
> But from time and time, we found that it took forever to refresh materialized
> view( normally or concurrently), and there is no response to query from this
> materialized view.
That sounds like a locking problem. Have you looked into pg_locks
while this is happening, to
materialized view refreshing problem?
Thanks
Hellen Jiang