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 1rc9RA-001Dum-An for pgsql-general@arkaria.postgresql.org; Mon, 19 Feb 2024 19:36:25 +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 1rc9R8-00Gmpt-Tt for pgsql-general@arkaria.postgresql.org; Mon, 19 Feb 2024 19:36:22 +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 1rc9R7-00Gmpk-3r for pgsql-general@lists.postgresql.org; Mon, 19 Feb 2024 19:36:22 +0000 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rc9R2-0082UN-D1 for pgsql-general@lists.postgresql.org; Mon, 19 Feb 2024 19:36:20 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 5708F13800CE; Mon, 19 Feb 2024 14:36:14 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 19 Feb 2024 14:36:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1708371374; x=1708457774; bh=l4qWjhmDvHAgSaAQdFxoFmcgpLe9kM2hQ+31Yu0++TE=; b= g+zA8AkbUK+kH84FIAMYOd56MQ8s407z6cliCZyGj48VGqzSCgkQ3SdLoRfgriqk Qf6BsSRtegFXoPVLzCWCYfIM0GNl4It78xDtfwCmM1HxdYQ+v1Lgp7mgHPeATDNf Ca0gyK/rM6fI/yVj/7uUDIOJheGGDQgmInEPBAoSrOEDDjMGqTyw08jt+gTYYby1 kBfse2S79XkcirU3pSNym5HTsjg1zUXXBL8jM4qJmljXqFqnxO8fNgleZRtvUJx3 R0X24G+uw0/9IDeHvJQq3fio8ar9vs6f3fq2G5N/EuYWgTAilzrleq2/nEsRaYyg 5tuz38IH+h76uzVkc35Qkw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708371374; x= 1708457774; bh=l4qWjhmDvHAgSaAQdFxoFmcgpLe9kM2hQ+31Yu0++TE=; b=O JeUGYSFAnjEAtbOxitm/GWWdJvTrepG+adKr/8CnlcRoURE5gNqkXNHPZBvkciaO idAYbtLeibQLzxqxX53RG4Dk8rTlHd/9R5xDPx9xFvrfAGWRE+20bHvXW7BK5L2A 0cMvyxGsegi9w3lbCFWVOisjtNs15jWIkNwDbWchj2EQMgxpbAeVlrer3H0CePaz /uAntdUCJYq86I1V6QQ1iNrfPVb+OWAarmd/FQ+H4DepQIIcKNYBL+lUrVHi0wl1 khkF5GqMyjasNV5s6RzCMT8mB0k3OgX90H/l+r7fpJSgw+r4vIOjL/GMLU1FUwco zqy0KEh1X/Y8kc8gpddcg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekgdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeelgeevkeekkeeuiefgtdevieeluefhfedufeetkeej ffekjeeujeehgeehgeektdenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhi rghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Feb 2024 14:36:13 -0500 (EST) Message-ID: Date: Mon, 19 Feb 2024 11:36:12 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Mat Views and Conflicts Content-Language: en-US To: Zahir Lalani , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/19/24 09:52, Zahir Lalani wrote: > Hi All > > My understanding and hope was that Mat Views cache their data and that > is how they are so fast. But we are experience “cancelling statement due > to conflict with recovery” errors on MV’s with large data sets and I > thought that this could only happen if we ran the underlying query, not > the Mat View? 1) When you say '... ran the underlying query ...' are you referring to: REFRESH MATERIALIZED VIEW https://www.postgresql.org/docs/current/sql-refreshmaterializedview.html 2) What is the complete error message from the Postgres log? > > Have I got it wrong?? > > Z > -- Adrian Klaver adrian.klaver@aklaver.com