Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qZGSf-004mQI-Mr for pgsql-general@arkaria.postgresql.org; Thu, 24 Aug 2023 19:57:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qZGSe-00CVKH-Gh for pgsql-general@arkaria.postgresql.org; Thu, 24 Aug 2023 19:57:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qZGSe-00CVJy-4f for pgsql-general@lists.postgresql.org; Thu, 24 Aug 2023 19:57:43 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qZGSb-000q61-7c for pgsql-general@lists.postgresql.org; Thu, 24 Aug 2023 19:57:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 37OJvcRQ3970230; Thu, 24 Aug 2023 15:57:38 -0400 From: Tom Lane To: Hellen Jiang cc: "pgsql-general@lists.postgresql.org" Subject: Re: Materialized view refreshing problem In-reply-to: References: <3961855.1692903749@sss.pgh.pa.us> Comments: In-reply-to Hellen Jiang message dated "Thu, 24 Aug 2023 19:36:41 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3970228.1692907058.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 24 Aug 2023 15:57:38 -0400 Message-ID: <3970229.1692907058@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hellen Jiang writes: > When the materialized view was refreshing concurrently, I saw the pg_loc= k like this: there was no response within 30 seconds when the api calls th= is query, and we got api time out. Well, that seems to confirm my idea that the REFRESH is blocked behind somebody else's lock. But you need to look to see which session is holding a lock on mvw_cbsd_status_grants_lessinfo_active_softmarker and what it's doing. regards, tom lane